mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
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)
4b6b0c4024
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user