mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
feat(api): add "move" to nvim_input_mouse
This commit is contained in:
@@ -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")) {
|
||||
|
Reference in New Issue
Block a user