diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-21 08:00:03 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-09-21 09:43:12 +0800 |
commit | adb73772d9197a7fa6e9ee7a2e8874118e60844d (patch) | |
tree | c5c2087188b5627c2fe1f31f37e068b644c481e2 /test/functional/ui | |
parent | f094db0e5ccaddca2b5db05bf9545d55f3eededf (diff) | |
download | rneovim-adb73772d9197a7fa6e9ee7a2e8874118e60844d.tar.gz rneovim-adb73772d9197a7fa6e9ee7a2e8874118e60844d.tar.bz2 rneovim-adb73772d9197a7fa6e9ee7a2e8874118e60844d.zip |
vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplits
Problem: Wrong curswant when clicking on empty line or with vsplits.
Solution: Don't check for ScreenCols[] before the start of the window
and handle empty line properly.
closes: vim/vim#13132
https://github.com/vim/vim/commit/03cd697d635f1b0e7ffe21cf8244a8fb755f2ddb
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/float_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/ui/multigrid_spec.lua | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index f75fb52108..e077e21216 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -6287,7 +6287,7 @@ describe('float window', function() end if multigrid then - meths.input_mouse('left', 'press', '', 1, 0, 0) + meths.input_mouse('left', 'press', '', 2, 0, 0) screen:expect{grid=[[ ## grid 1 [2:----------------------------------------]| @@ -6366,7 +6366,7 @@ describe('float window', function() end if multigrid then - meths.input_mouse('left', 'press', '', 1, 0, 0) + meths.input_mouse('left', 'press', '', 2, 0, 0) screen:expect{grid=[[ ## grid 1 [2:----------------------------------------]| diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index a8d01cfbf1..fd24174f74 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -1676,7 +1676,7 @@ describe('ui/mouse/input', function() end) - it('getmousepos works correctly', function() + it('getmousepos() works correctly', function() local winwidth = meths.get_option_value('winwidth', {}) -- Set winwidth=1 so that window sizes don't change. meths.set_option_value('winwidth', 1, {}) @@ -1771,7 +1771,7 @@ describe('ui/mouse/input', function() -- Test that mouse position values are properly set for ordinary windows. -- Set the float to be unfocusable instead of closing, to additionally test - -- that getmousepos does not consider unfocusable floats. (see discussion + -- that getmousepos() does not consider unfocusable floats. (see discussion -- in PR #14937 for details). opts.focusable = false meths.win_set_config(float, opts) diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua index 1778c8218b..6f4082beda 100644 --- a/test/functional/ui/multigrid_spec.lua +++ b/test/functional/ui/multigrid_spec.lua @@ -2307,6 +2307,7 @@ describe('ext_multigrid', function() {1:~ }| ]]} + -- XXX: mouse_check_grid() doesn't work properly when clicking on grid 1 meths.input_mouse('left', 'press', '', 1, 6, 20) -- TODO(bfredl): "batching" input_mouse is formally not supported yet. -- Normally it should work fine in async context when nvim is not blocked, |