mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(mouse): indicate X1 and X2 button clicks on statusline (#30655)
This commit is contained in:
parent
305012ea07
commit
86c5c8724b
@ -194,7 +194,11 @@ static void call_click_def_func(StlClickDefinition *click_defs, int col, int whi
|
||||
? "r"
|
||||
: (which_button == MOUSE_MIDDLE
|
||||
? "m"
|
||||
: "?")))
|
||||
: (which_button == MOUSE_X1
|
||||
? "x1"
|
||||
: (which_button == MOUSE_X2
|
||||
? "x2"
|
||||
: "?")))))
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -63,6 +63,22 @@ for _, model in ipairs(mousemodels) do
|
||||
eq('0 3 r', eval('g:testvar'))
|
||||
api.nvim_input_mouse('right', 'press', '', 0, 6, 28)
|
||||
eq('0 4 r', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x1', 'press', '', 0, 6, 17)
|
||||
eq('0 1 x1', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x1', 'press', '', 0, 6, 17)
|
||||
eq('0 2 x1', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x1', 'press', '', 0, 6, 17)
|
||||
eq('0 3 x1', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x1', 'press', '', 0, 6, 17)
|
||||
eq('0 4 x1', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x2', 'press', '', 0, 6, 28)
|
||||
eq('0 1 x2', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x2', 'press', '', 0, 6, 28)
|
||||
eq('0 2 x2', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x2', 'press', '', 0, 6, 28)
|
||||
eq('0 3 x2', eval('g:testvar'))
|
||||
api.nvim_input_mouse('x2', 'press', '', 0, 6, 28)
|
||||
eq('0 4 x2', eval('g:testvar'))
|
||||
end)
|
||||
|
||||
it('works with control characters and highlight', function()
|
||||
|
Loading…
Reference in New Issue
Block a user