mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
test: improve some input tests
This commit is contained in:
@@ -436,8 +436,11 @@ describe('TUI', function()
|
||||
|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
feed_data(':tab split\r:tabnew\r')
|
||||
feed_data(':highlight Tabline ctermbg=NONE ctermfg=NONE cterm=underline\r')
|
||||
child_session:request('nvim_command', [[
|
||||
tab split
|
||||
tabnew
|
||||
highlight Tabline ctermbg=NONE ctermfg=NONE cterm=underline
|
||||
]])
|
||||
local attrs = screen:get_default_attr_ids()
|
||||
attrs[11] = {underline = true}
|
||||
screen:expect([[
|
||||
|
||||
@@ -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