diff options
| author | luukvbaal <luukvbaal@gmail.com> | 2025-02-27 08:52:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-27 08:52:19 +0100 |
| commit | f86864f22feff1440fd087ffdaea1363bbd6ec8b (patch) | |
| tree | d130d413ef28d5f9619256a2e461f397cbc03a84 /src/nvim/move.c | |
| parent | 1e4c70803312cb4ae06cffb3de4a24105dd2a514 (diff) | |
| download | rneovim-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 'src/nvim/move.c')
| -rw-r--r-- | src/nvim/move.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 9a2bae5753..89d2b69f51 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -2294,7 +2294,8 @@ void cursor_correct(win_T *wp) int below = wp->w_filler_rows; // screen lines below botline while ((above < above_wanted || below < below_wanted) && topline < botline) { if (below < below_wanted && (below <= above || above >= above_wanted)) { - below += plines_win_full(wp, botline, &botline, NULL, true, true); + below += plines_win_full(wp, botline, NULL, NULL, true, true); + hasFolding(wp, botline, &botline, NULL); botline--; } if (above < above_wanted && (above < below || below >= below_wanted)) { |