aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-02-27 08:52:19 +0100
committerGitHub <noreply@github.com>2025-02-27 08:52:19 +0100
commitf86864f22feff1440fd087ffdaea1363bbd6ec8b (patch)
treed130d413ef28d5f9619256a2e461f397cbc03a84 /test/functional/ui
parent1e4c70803312cb4ae06cffb3de4a24105dd2a514 (diff)
downloadrneovim-f86864f22feff1440fd087ffdaea1363bbd6ec8b.tar.gz
rneovim-f86864f22feff1440fd087ffdaea1363bbd6ec8b.tar.bz2
rneovim-f86864f22feff1440fd087ffdaea1363bbd6ec8b.zip
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.
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/fold_spec.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index aea629df07..13b1558b68 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -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)