]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0591: 'scrolljump' ignored when scrolling up v9.2.0591
authorglepnir <glephunter@gmail.com>
Wed, 3 Jun 2026 18:48:46 +0000 (18:48 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 3 Jun 2026 18:48:46 +0000 (18:48 +0000)
commita4a60c0fdb8aeec21dcd14871c465fe0f2e6fbc3
tree3fa80982a07a1363def79ff7f3103918ea3a8bcb
parent7d8971edf470132e9dde3ae01be6830cfed70773
patch 9.2.0591: 'scrolljump' ignored when scrolling up

Problem:  srolljump=-100 only scrolls half a page going up, but works
          fine going down. update_topline() always falls back to
          scroll_cursor_halfway() when the cursor is far above topline.
Solution: Only center when sj is smaller than half the window. Otherwise
          call scroll_cursor_top like the downward path does (glepnir).

fixes:  #1527
closes: #20366

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/move.c
src/testdir/test_options.vim
src/version.c