Files
neovim/test
zeertzjq 327c04a0d1 vim-patch:9.2.0904: "zb" scrolls incorrectly with cursor just above fold (#41143)
Problem:  "zb" scrolls incorrectly with cursor just above fold.
Solution: Handle boff.lnum being set to the last line of a fold
          (zeertzjq).

With the cursor just above fold, botline_forw() moves boff.lnum to the
last line of the fold, but curwin->w_botline is at the first line of the
fold, so the boff.lnum == curwin->w_botline condition never holds.

Instead, check that boff.lnum has just moved to or past w_botline by
comparing its previous value with w_botline.

Also make a similar change to the loff.lnum check above for symmetry.
That one doesn't change behavior, as topline_back() sets loff.lnum to
the first line of a fold.

related: neovim/neovim#41122
closes:  vim/vim#20923

aee686334c
(cherry picked from commit 21a0227d2f)
2026-08-04 00:35:23 +00:00
..
2026-04-22 23:01:00 +00:00
2026-04-22 23:01:00 +00:00