mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
feat(tabline): middle mouse button now closes tab (#27522)
This commit is contained in:
@@ -184,4 +184,18 @@ describe('tabline', function()
|
||||
]],
|
||||
}
|
||||
end)
|
||||
|
||||
it('middle-click closes tab', function()
|
||||
command('tabnew')
|
||||
command('tabnew')
|
||||
command('tabnew')
|
||||
command('tabprev')
|
||||
eq({ 3, 4 }, api.nvim_eval('[tabpagenr(), tabpagenr("$")]'))
|
||||
api.nvim_input_mouse('middle', 'press', '', 0, 0, 1)
|
||||
eq({ 2, 3 }, api.nvim_eval('[tabpagenr(), tabpagenr("$")]'))
|
||||
api.nvim_input_mouse('middle', 'press', '', 0, 0, 20)
|
||||
eq({ 2, 2 }, api.nvim_eval('[tabpagenr(), tabpagenr("$")]'))
|
||||
api.nvim_input_mouse('middle', 'press', '', 0, 0, 1)
|
||||
eq({ 1, 1 }, api.nvim_eval('[tabpagenr(), tabpagenr("$")]'))
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user