mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
test: improve some input tests
This commit is contained in:
@@ -1572,23 +1572,17 @@ describe('ui/mouse/input', function()
|
||||
meths.input_mouse('left', 'release', '', 0, 0, 0)
|
||||
end)
|
||||
|
||||
it('scroll keys are not translated into multiclicks #6211 #6989', function()
|
||||
it('scroll keys are not translated into multiclicks and can be mapped #6211 #6989', function()
|
||||
meths.set_var('mouse_up', 0)
|
||||
meths.set_var('mouse_up2', 0)
|
||||
meths.set_var('mouse_up3', 0)
|
||||
meths.set_var('mouse_up4', 0)
|
||||
command('nnoremap <ScrollWheelUp> <Cmd>let g:mouse_up += 1<CR>')
|
||||
command('nnoremap <2-ScrollWheelUp> <Cmd>let g:mouse_up2 += 1<CR>')
|
||||
command('nnoremap <3-ScrollWheelUp> <Cmd>let g:mouse_up3 += 1<CR>')
|
||||
command('nnoremap <4-ScrollWheelUp> <Cmd>let g:mouse_up4 += 1<CR>')
|
||||
meths.input_mouse('wheel', 'up', '', 0, 0, 0)
|
||||
meths.input_mouse('wheel', 'up', '', 0, 0, 0)
|
||||
feed('<ScrollWheelUp><0,0>')
|
||||
feed('<ScrollWheelUp><0,0>')
|
||||
meths.input_mouse('wheel', 'up', '', 0, 0, 0)
|
||||
meths.input_mouse('wheel', 'up', '', 0, 0, 0)
|
||||
eq(4, meths.get_var('mouse_up'))
|
||||
eq(0, meths.get_var('mouse_up2'))
|
||||
eq(0, meths.get_var('mouse_up3'))
|
||||
eq(0, meths.get_var('mouse_up4'))
|
||||
end)
|
||||
|
||||
it('feeding <MouseMove> does not use uninitialized memory #19480', function()
|
||||
|
||||
Reference in New Issue
Block a user