diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 56f364bf0a..3315936b6a 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -1444,7 +1444,9 @@ static bool send_mouse_event(Terminal *term, int c) return false; } - mouse_action(term, button, row, col - offset, pressed, 0); + VTermModifier mod = VTERM_MOD_NONE; + convert_modifiers(c, &mod); + mouse_action(term, button, row, col - offset, pressed, mod); return false; } diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 888d123b17..ce47e4715c 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -464,6 +464,10 @@ describe('terminal input', function() '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '<2-LeftMouse>', '<2-LeftRelease>', + '', '', '<2-RightMouse>', '<2-RightRelease>', + '', '', '<2-MiddleMouse>', '<2-MiddleRelease>', + '', '', '', '', }) do feed('' .. key) retry(nil, nil, function() eq(key, meths.get_current_line()) end)