diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-04 21:44:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 21:44:31 +0800 |
commit | 5ac6654334785427886d5698fdbe79577c8c6efe (patch) | |
tree | b5e4773025a714f20391e800232ec35929794133 /src/nvim/api/vim.c | |
parent | 900a7741821ff8dfb0634290a343e501955e9a1a (diff) | |
parent | 82d128405aaeb619a0c04353449f5717da126249 (diff) | |
download | rneovim-5ac6654334785427886d5698fdbe79577c8c6efe.tar.gz rneovim-5ac6654334785427886d5698fdbe79577c8c6efe.tar.bz2 rneovim-5ac6654334785427886d5698fdbe79577c8c6efe.zip |
Merge pull request #19481 from zeertzjq/vim-8.2.4674
Add 'mousemoveevent' as a UI option
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 83d6ba8dc7..95c9919522 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -336,9 +336,9 @@ Integer nvim_input(String keys) /// mouse input in a GUI. The deprecated pseudokey form /// ("<LeftMouse><col,row>") of |nvim_input()| has the same limitation. /// -/// @param button Mouse button: one of "left", "right", "middle", "wheel". +/// @param button Mouse button: one of "left", "right", "middle", "wheel", "move". /// @param action For ordinary buttons, one of "press", "drag", "release". -/// For the wheel, one of "up", "down", "left", "right". +/// For the wheel, one of "up", "down", "left", "right". Ignored for "move". /// @param 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" @@ -365,6 +365,8 @@ void nvim_input_mouse(String button, String action, String modifier, Integer gri code = KE_RIGHTMOUSE; } else if (strequal(button.data, "wheel")) { code = KE_MOUSEDOWN; + } else if (strequal(button.data, "move")) { + code = KE_MOUSEMOVE; } else { goto error; } @@ -381,7 +383,7 @@ void nvim_input_mouse(String button, String action, String modifier, Integer gri } else { goto error; } - } else { + } else if (code != KE_MOUSEMOVE) { if (strequal(action.data, "press")) { // pass } else if (strequal(action.data, "drag")) { |