mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46:29 +00:00
fix(mouse): avoid dragging when clicking next to popupmenu
This commit is contained in:
@@ -590,7 +590,7 @@ describe('statuscolumn', function()
|
||||
eq('0 1 l 11', eval("g:testvar"))
|
||||
end)
|
||||
|
||||
it('selecting popupmenu does not drag mouse', function()
|
||||
it('popupmenu callback does not drag mouse on close', function()
|
||||
screen:try_resize(screen._width, 2)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = {foreground = Screen.colors.Brown},
|
||||
@@ -604,6 +604,7 @@ describe('statuscolumn', function()
|
||||
popup PopupStc
|
||||
endfunction
|
||||
]])
|
||||
-- clicking an item does not drag mouse
|
||||
meths.input_mouse('left', 'press', '', 0, 0, 0)
|
||||
screen:expect([[
|
||||
{0:8 }^aaaaa |
|
||||
@@ -615,6 +616,19 @@ describe('statuscolumn', function()
|
||||
{0:8 }^aaaaa |
|
||||
0 1 l 8 |
|
||||
]])
|
||||
command('echo')
|
||||
-- clicking outside to close the menu does not drag mouse
|
||||
meths.input_mouse('left', 'press', '', 0, 0, 0)
|
||||
screen:expect([[
|
||||
{0:8 }^aaaaa |
|
||||
{1: Echo } |
|
||||
]])
|
||||
meths.input_mouse('left', 'press', '', 0, 0, 10)
|
||||
meths.input_mouse('left', 'release', '', 0, 0, 10)
|
||||
screen:expect([[
|
||||
{0:8 }^aaaaa |
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
Reference in New Issue
Block a user