Skip to content

Commit b20b9e1

Browse files
committed
patch 8.1.2062: the mouse code is spread out
Problem: The mouse code is spread out. Solution: Move all the mouse code to mouse.c. (Yegappan Lakshmanan, closes #4959)
1 parent 4d5c126 commit b20b9e1

35 files changed

Lines changed: 2415 additions & 2490 deletions

Filelist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ SRC_ALL = \
8080
src/message_test.c \
8181
src/misc1.c \
8282
src/misc2.c \
83+
src/mouse.c \
8384
src/move.c \
8485
src/mysign \
8586
src/nbdebug.c \
@@ -231,6 +232,7 @@ SRC_ALL = \
231232
src/proto/message.pro \
232233
src/proto/misc1.pro \
233234
src/proto/misc2.pro \
235+
src/proto/mouse.pro \
234236
src/proto/move.pro \
235237
src/proto/netbeans.pro \
236238
src/proto/normal.pro \

src/Make_cyg_ming.mak

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ OBJ = \
754754
$(OUTDIR)/message.o \
755755
$(OUTDIR)/misc1.o \
756756
$(OUTDIR)/misc2.o \
757+
$(OUTDIR)/mouse.o \
757758
$(OUTDIR)/move.o \
758759
$(OUTDIR)/mbyte.o \
759760
$(OUTDIR)/normal.o \
@@ -866,7 +867,7 @@ ifeq ($(TERMINAL),yes)
866867
OBJ += $(OUTDIR)/terminal.o \
867868
$(OUTDIR)/encoding.o \
868869
$(OUTDIR)/keyboard.o \
869-
$(OUTDIR)/mouse.o \
870+
$(OUTDIR)/termmouse.o \
870871
$(OUTDIR)/parser.o \
871872
$(OUTDIR)/pen.o \
872873
$(OUTDIR)/termscreen.o \

src/Make_morph.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ SRC = arabic.c \
7474
message.c \
7575
misc1.c \
7676
misc2.c \
77+
mouse.c \
7778
move.c \
7879
normal.c \
7980
ops.c \

src/Make_mvc.mak

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ TERM_OBJ = \
365365
$(OBJDIR)/terminal.obj \
366366
$(OBJDIR)/encoding.obj \
367367
$(OBJDIR)/keyboard.obj \
368-
$(OBJDIR)/mouse.obj \
368+
$(OBJDIR)/termmouse.obj \
369369
$(OBJDIR)/parser.obj \
370370
$(OBJDIR)/pen.obj \
371371
$(OBJDIR)/termscreen.obj \
@@ -762,6 +762,7 @@ OBJ = \
762762
$(OUTDIR)\message.obj \
763763
$(OUTDIR)\misc1.obj \
764764
$(OUTDIR)\misc2.obj \
765+
$(OUTDIR)\mouse.obj \
765766
$(OUTDIR)\move.obj \
766767
$(OUTDIR)\normal.obj \
767768
$(OUTDIR)\ops.obj \
@@ -1601,6 +1602,8 @@ $(OUTDIR)/misc1.obj: $(OUTDIR) misc1.c $(INCL)
16011602

16021603
$(OUTDIR)/misc2.obj: $(OUTDIR) misc2.c $(INCL)
16031604

1605+
$(OUTDIR)/mouse.obj: $(OUTDIR) mouse.c $(INCL)
1606+
16041607
$(OUTDIR)/move.obj: $(OUTDIR) move.c $(INCL)
16051608

16061609
$(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
@@ -1736,7 +1739,7 @@ $(OUTDIR)/encoding.obj: $(OUTDIR) libvterm/src/encoding.c $(TERM_DEPS)
17361739

17371740
$(OUTDIR)/keyboard.obj: $(OUTDIR) libvterm/src/keyboard.c $(TERM_DEPS)
17381741

1739-
$(OUTDIR)/mouse.obj: $(OUTDIR) libvterm/src/mouse.c $(TERM_DEPS)
1742+
$(OUTDIR)/termmouse.obj: $(OUTDIR) libvterm/src/termmouse.c $(TERM_DEPS)
17401743

17411744
$(OUTDIR)/parser.obj: $(OUTDIR) libvterm/src/parser.c $(TERM_DEPS)
17421745

@@ -1822,6 +1825,7 @@ proto.h: \
18221825
proto/message.pro \
18231826
proto/misc1.pro \
18241827
proto/misc2.pro \
1828+
proto/mouse.pro \
18251829
proto/move.pro \
18261830
proto/mbyte.pro \
18271831
proto/normal.pro \

src/Make_vms.mms

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ SRC = arabic.c arglist.c autocmd.c beval.c blob.c blowfish.c buffer.c \
316316
if_cscope.c if_xcmdsrv.c fileio.c filepath.c, findfile.c fold.c \
317317
getchar.c hardcopy.c hashtab.c highlight.c \
318318
indent.c insexpand.c json.c list.c main.c map.c mark.c menu.c mbyte.c \
319-
memfile.c memline.c message.c misc1.c misc2.c move.c normal.c ops.c \
319+
memfile.c memline.c message.c misc1.c misc2.c mouse.c move.c normal.c \
320+
ops.c \
320321
option.c optionstr.c popupmnu.c popupwin.c profiler.c quickfix.c \
321322
regexp.c scriptfile.c \
322323
search.c session.c sha256.c sign.c spell.c spellfile.c syntax.c tag.c \
@@ -336,7 +337,8 @@ OBJ = arabic.obj arglist.obj autocmd.obj beval.obj blob.obj blowfish.obj \
336337
findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
337338
highlight.obj indent.obj insexpand.obj json.obj list.obj main.obj \
338339
map.obj mark.obj menu.obj memfile.obj memline.obj message.obj \
339-
misc1.obj misc2.obj move.obj mbyte.obj normal.obj ops.obj option.obj \
340+
misc1.obj misc2.obj mouse.obj move.obj mbyte.obj normal.obj ops.obj \
341+
option.obj \
340342
optionstr.obj popupmnu.obj popupwin.obj profiler.obj quickfix.obj \
341343
regexp.obj scriptfile.obj \
342344
search.obj session.obj sha256.obj sign.obj spell.obj spellfile.obj \
@@ -697,6 +699,9 @@ misc1.obj : misc1.c vim.h [.auto]config.h feature.h os_unix.h \
697699
misc2.obj : misc2.c vim.h [.auto]config.h feature.h os_unix.h \
698700
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
699701
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h
702+
mouse.obj : mouse.c vim.h [.auto]config.h feature.h os_unix.h \
703+
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
704+
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h
700705
move.obj : move.c vim.h [.auto]config.h feature.h os_unix.h \
701706
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
702707
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h

src/Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,7 @@ BASIC_SRC = \
16291629
message.c \
16301630
misc1.c \
16311631
misc2.c \
1632+
mouse.c \
16321633
move.c \
16331634
mbyte.c \
16341635
normal.c \
@@ -1762,6 +1763,7 @@ OBJ_COMMON = \
17621763
objects/menu.o \
17631764
objects/misc1.o \
17641765
objects/misc2.o \
1766+
objects/mouse.o \
17651767
objects/move.o \
17661768
objects/mbyte.o \
17671769
objects/normal.o \
@@ -1921,6 +1923,7 @@ PRO_AUTO = \
19211923
message.pro \
19221924
misc1.pro \
19231925
misc2.pro \
1926+
mouse.pro \
19241927
move.pro \
19251928
normal.pro \
19261929
ops.pro \
@@ -3287,6 +3290,9 @@ objects/misc1.o: misc1.c
32873290
objects/misc2.o: misc2.c
32883291
$(CCC) -o $@ misc2.c
32893292

3293+
objects/mouse.o: mouse.c
3294+
$(CCC) -o $@ mouse.c
3295+
32903296
objects/move.o: move.c
32913297
$(CCC) -o $@ move.c
32923298

@@ -3430,8 +3436,8 @@ objects/encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
34303436
objects/keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
34313437
$(CCCTERM) -o $@ libvterm/src/keyboard.c
34323438

3433-
objects/mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
3434-
$(CCCTERM) -o $@ libvterm/src/mouse.c
3439+
objects/termmouse.o: libvterm/src/termmouse.c $(TERM_DEPS)
3440+
$(CCCTERM) -o $@ libvterm/src/termmouse.c
34353441

34363442
objects/parser.o: libvterm/src/parser.c $(TERM_DEPS)
34373443
$(CCCTERM) -o $@ libvterm/src/parser.c
@@ -3769,6 +3775,10 @@ objects/misc2.o: misc2.c vim.h protodef.h auto/config.h feature.h os_unix.h \
37693775
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
37703776
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
37713777
proto.h globals.h
3778+
objects/mouse.o: mouse.c vim.h protodef.h auto/config.h feature.h os_unix.h \
3779+
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
3780+
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
3781+
proto.h globals.h
37723782
objects/move.o: move.c vim.h protodef.h auto/config.h feature.h os_unix.h \
37733783
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
37743784
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@@ -4063,7 +4073,7 @@ objects/encoding.o: libvterm/src/encoding.c libvterm/src/vterm_internal.h \
40634073
objects/keyboard.o: libvterm/src/keyboard.c libvterm/src/vterm_internal.h \
40644074
libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
40654075
libvterm/src/utf8.h
4066-
objects/mouse.o: libvterm/src/mouse.c libvterm/src/vterm_internal.h \
4076+
objects/termmouse.o: libvterm/src/termmouse.c libvterm/src/vterm_internal.h \
40674077
libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
40684078
libvterm/src/utf8.h
40694079
objects/parser.o: libvterm/src/parser.c libvterm/src/vterm_internal.h \

src/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ memfile.c | storing lines for buffers in a swapfile
5454
memline.c | storing lines for buffers in memory
5555
menu.c | menus
5656
message.c | (error) messages
57+
mouse.c | handling the mouse
5758
ops.c | handling operators ("d", "y", "p")
5859
option.c | options
5960
optionstr.c | handling string options
@@ -63,7 +64,7 @@ profiler.c | vim script profiler
6364
quickfix.c | quickfix commands (":make", ":cn")
6465
regexp.c | pattern matching
6566
scriptfile.c | runtime directory handling and sourcing scripts
66-
screen.c | updating the windows
67+
screen.c | lower level screen functions
6768
search.c | pattern searching
6869
session.c | sessions and views
6970
sign.c | signs

src/auto/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7909,7 +7909,7 @@ if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
79097909

79107910
TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/termscreen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
79117911

7912-
TERM_OBJ="objects/encoding.o objects/keyboard.o objects/mouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
7912+
TERM_OBJ="objects/encoding.o objects/keyboard.o objects/termmouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
79137913

79147914
fi
79157915

src/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
21062106
AC_DEFINE(FEAT_TERMINAL)
21072107
TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/termscreen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
21082108
AC_SUBST(TERM_SRC)
2109-
TERM_OBJ="objects/encoding.o objects/keyboard.o objects/mouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
2109+
TERM_OBJ="objects/encoding.o objects/keyboard.o objects/termmouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
21102110
AC_SUBST(TERM_OBJ)
21112111
fi
21122112

0 commit comments

Comments
 (0)