vim-patch:9.1.0526: Unwanted cursor movement with pagescroll at start of buffer (#29569)

Problem:  Cursor is moved to bottom of window trying to pagescroll when
          already at the start of the buffer (Asheq Imran, after v9.1.0357)
Solution: Don't move cursor when buffer content did not move.
          (Luuk van Baal)

8ccb89016e
(cherry picked from commit 3e6cec0bef)
This commit is contained in:
luukvbaal
2024-07-05 01:51:34 +02:00
committed by github-actions[bot]
parent d6a73d7314
commit f89d4ee6ce
2 changed files with 8 additions and 3 deletions

View File

@@ -4267,6 +4267,9 @@ func Test_page_cursor_topbot()
call assert_equal(18, line('.'))
exe "norm! \<C-B>\<C-F>"
call assert_equal(9, line('.'))
" Not when already at the start of the buffer.
exe "norm! ggj\<C-B>"
call assert_equal(2, line('.'))
bwipe!
endfunc