aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_normal.vim
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2024-04-22 15:24:32 +0200
committerGitHub <noreply@github.com>2024-04-22 21:24:32 +0800
commitea1c9f60e04429e8472370b59616d069ad7fbc8c (patch)
tree29c08d6e52d907acc96dd548bbb8302153a535c3 /test/old/testdir/test_normal.vim
parent783b0aba411618c27cae48625f0f98e0cb503758 (diff)
downloadrneovim-ea1c9f60e04429e8472370b59616d069ad7fbc8c.tar.gz
rneovim-ea1c9f60e04429e8472370b59616d069ad7fbc8c.tar.bz2
rneovim-ea1c9f60e04429e8472370b59616d069ad7fbc8c.zip
vim-patch:9.1.0357: Page scrolling should place cursor at window boundaries (#28429)
Problem: Page scrolling does not always place the cursor at the top or bottom of the window (Mathias Rav) Solution: Place the cursor at the top or bottom of the window. (Luuk van Baal) https://github.com/vim/vim/commit/4b6b0c4024df08dd8ce49dff3c76356ff81190c4
Diffstat (limited to 'test/old/testdir/test_normal.vim')
-rw-r--r--test/old/testdir/test_normal.vim17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index 62804b0142..7f67dcdeb1 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -3823,8 +3823,8 @@ func Test_normal_vert_scroll_longline()
call assert_equal(11, line('.'))
call assert_equal(1, winline())
exe "normal \<C-B>"
- call assert_equal(10, line('.'))
- call assert_equal(4, winline())
+ call assert_equal(11, line('.'))
+ call assert_equal(5, winline())
exe "normal \<C-B>\<C-B>"
call assert_equal(5, line('.'))
call assert_equal(5, winline())
@@ -4257,4 +4257,17 @@ func Test_halfpage_cursor_startend()
bwipe!
endfunc
+" Test for Ctrl-F/B moving the cursor to the window boundaries.
+func Test_page_cursor_topbot()
+ 10new
+ call setline(1, range(1, 100))
+ exe "norm! gg2\<C-F>"
+ call assert_equal(17, line('.'))
+ exe "norm! \<C-B>"
+ call assert_equal(18, line('.'))
+ exe "norm! \<C-B>\<C-F>"
+ call assert_equal(9, line('.'))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab nofoldenable