fix(mouse): fix popup menu position check with winbar

(cherry picked from commit e37fb2515d)
This commit is contained in:
zeertzjq
2023-05-03 09:05:50 +08:00
committed by github-actions[bot]
parent 017afa2fcf
commit 56e0b425ea
3 changed files with 85 additions and 1 deletions

View File

@@ -1861,5 +1861,16 @@ describe('ui/mouse/input', function()
feed('<Down><CR>')
eq({1, 9}, meths.win_get_cursor(0))
eq('ran away', funcs.getreg('"'))
-- Test for right click inside visual selection at bottom of window with winbar
command('setlocal winbar=WINBAR')
feed('2yyP')
funcs.setreg('"', '')
feed('G$vbb')
meths.input_mouse('right', 'press', '', 0, 4, 61)
meths.input_mouse('right', 'release', '', 0, 4, 61)
feed('<Down><CR>')
eq({4, 20}, meths.win_get_cursor(0))
eq('the moon', funcs.getreg('"'))
end)
end)