fix(mouse): ensure no scrolling with "ver:0" in 'mousescroll'

(cherry picked from commit b3360f0734)
This commit is contained in:
zeertzjq
2022-10-29 22:25:56 +08:00
committed by github-actions[bot]
parent f70feadb17
commit 747b8dac73
3 changed files with 20 additions and 2 deletions

View File

@@ -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()