mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
fix(mouse): avoid dragging when clicking next to popupmenu
(cherry picked from commit bce65ee429
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
07860aba75
commit
a27e683ca5
@@ -592,7 +592,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},
|
||||
@@ -606,6 +606,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 |
|
||||
@@ -617,6 +618,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