diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-30 07:10:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 07:10:39 +0800 |
commit | 23080a4d7a9043913cb4875e18118731a4562032 (patch) | |
tree | 17393363a61ac8c3d2555647286624d4f38c1e09 /test/functional/options/mousescroll_spec.lua | |
parent | f2d9c330fc56d1e589d33c82d372532e1695ce40 (diff) | |
download | rneovim-23080a4d7a9043913cb4875e18118731a4562032.tar.gz rneovim-23080a4d7a9043913cb4875e18118731a4562032.tar.bz2 rneovim-23080a4d7a9043913cb4875e18118731a4562032.zip |
fix(mouse): ensure no scrolling with "ver:0" in 'mousescroll' (#20861)
Diffstat (limited to 'test/functional/options/mousescroll_spec.lua')
-rw-r--r-- | test/functional/options/mousescroll_spec.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/options/mousescroll_spec.lua b/test/functional/options/mousescroll_spec.lua index 2c9b2d175e..5bff45a836 100644 --- a/test/functional/options/mousescroll_spec.lua +++ b/test/functional/options/mousescroll_spec.lua @@ -97,6 +97,24 @@ describe("'mousescroll'", function() eq(10, screencol()) scroll('left') eq(10, screencol()) + + -- vertical scrolling is still disabled with non-zero 'scrolloff' value + command('set scrolloff=1') + + eq(10, screenrow()) + scroll('up') + eq(10, screenrow()) + scroll('down') + eq(10, screenrow()) + + -- also in insert mode + feed('i') + + eq(10, screenrow()) + scroll('up') + eq(10, screenrow()) + scroll('down') + eq(10, screenrow()) end) local test_vertical_scrolling = function() |