From 00b49dd8dd638c5fe1b664273aea5c843d69f36d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 24 Jul 2022 11:20:23 +0800 Subject: vim-patch:8.2.4674: cannot force getting MouseMove events Problem: Cannot force getting MouseMove events. Solution: Add the 'mousemoveevent' option with implementaiton for the GUI. (Ernie Rael, closes vim/vim#10044) https://github.com/vim/vim/commit/c4cb544cd5beaa864b3893e4b8d0085393c7dbce This only ports the docs and the option variable. The following commits will actually implement it as a UI option. --- runtime/doc/options.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 9e396dd3e8..208633f93f 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4231,6 +4231,18 @@ A jump table for the options with a short description can be found at |Q_op|. The 'mousemodel' option is set by the |:behave| command. + *'mousemoveevent'* *'mousemev'* +'mousemoveevent' 'mousemev' boolean (default off) + global + {only works in the GUI} + When on, mouse move events are delivered to the input queue and are + available for mapping. The default, off, avoids the mouse movement + overhead except when needed. + Warning: Setting this option can make pending mappings to be aborted + when the mouse is moved. + Currently only works in the GUI, may be made to work in a terminal + later. + *'mousescroll'* 'mousescroll' string (default "ver:3,hor:6") global -- cgit From a5fe7940c8b9436b78ae408eae8345266423f2c8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 24 Jul 2022 11:32:56 +0800 Subject: feat(ui-ext): make 'mousemoveevent' a ui_option --- runtime/doc/ui.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime') diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index 3fb9ed1125..955af84679 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -207,6 +207,7 @@ the editor. 'guifontwide' 'linespace' 'mousefocus' + 'mousemoveevent' 'pumblend' 'showtabline' 'termguicolors' -- cgit From 04bd700ac3bc2bdea0e0d8747de95dab2034aa11 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 24 Jul 2022 11:26:54 +0800 Subject: feat(tui): support 'mousemoveevent' --- runtime/doc/options.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 208633f93f..316b7ae3f1 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4234,14 +4234,11 @@ A jump table for the options with a short description can be found at |Q_op|. *'mousemoveevent'* *'mousemev'* 'mousemoveevent' 'mousemev' boolean (default off) global - {only works in the GUI} When on, mouse move events are delivered to the input queue and are available for mapping. The default, off, avoids the mouse movement overhead except when needed. Warning: Setting this option can make pending mappings to be aborted when the mouse is moved. - Currently only works in the GUI, may be made to work in a terminal - later. *'mousescroll'* 'mousescroll' string (default "ver:3,hor:6") -- cgit From ceb09701f29dcabcf219f458fffbb64f5adced9b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 24 Jul 2022 13:58:29 +0800 Subject: feat(api): add "move" to nvim_input_mouse --- runtime/doc/api.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 82978d0b3c..063e17ded9 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1067,9 +1067,11 @@ nvim_input_mouse({button}, {action}, {modifier}, {grid}, {row}, {col}) |api-fast| Parameters: ~ - {button} Mouse button: one of "left", "right", "middle", "wheel". + {button} Mouse button: one of "left", "right", "middle", "wheel", + "move". {action} For ordinary buttons, one of "press", "drag", "release". For the wheel, one of "up", "down", "left", "right". + Ignored for "move". {modifier} String of modifiers each represented by a single char. The same specifiers are used as for a key press, except that the "-" separator is optional, so "C-A-", "c-a" and "CA" -- cgit