mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 11:34:56 +00:00
fix(move): 'scrolloff' cursor correction no longer handles folds properly (#32642)
Problem: f58e7d5f passed `&botline` to `plines_win_full()`, (probably)
assuming it would be set to the first line of the fold.
Solution: Reinstate call to `hasFolding()` to do so.
This commit is contained in:
@@ -2744,4 +2744,23 @@ describe('folded lines', function()
|
||||
describe('without ext_multigrid', function()
|
||||
with_ext_multigrid(false)
|
||||
end)
|
||||
|
||||
it("do not interfere with corrected cursor position for 'scrolloff'", function()
|
||||
local screen = Screen.new(40, 7)
|
||||
exec([[
|
||||
call setline(1, range(10))
|
||||
6,7fold
|
||||
set scrolloff=1
|
||||
norm L
|
||||
]])
|
||||
screen:expect([[
|
||||
0 |
|
||||
1 |
|
||||
2 |
|
||||
3 |
|
||||
^4 |
|
||||
{13:+-- 2 lines: 5·························}|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user