aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_normal.vim
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-04-03 23:06:23 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2024-04-08 23:15:43 +0200
commite21423bb35077fe4bbb6a8fab1000e8bfc6b6b7b (patch)
tree772262a17c90d4b9a7ecfae87f0b5d8fa5ad4a90 /test/old/testdir/test_normal.vim
parente6cfa22c4cd5b3b422aa4f8350c8e73a3eb2a090 (diff)
downloadrneovim-e21423bb35077fe4bbb6a8fab1000e8bfc6b6b7b.tar.gz
rneovim-e21423bb35077fe4bbb6a8fab1000e8bfc6b6b7b.tar.bz2
rneovim-e21423bb35077fe4bbb6a8fab1000e8bfc6b6b7b.zip
vim-patch:9.1.0260: Problems with "zb" and scrolling to new topline with 'smoothscroll'
Problem: "zb" does not reveal filler lines at the start of a buffer. Scrolled cursor position with 'smoothscroll' is unpredictable, and may reset skipcol later if it is not visible (after v9.1.258) Solution: Replace confusing for loop that reaches final control value too early with while loop. Set "w_curswant" accordingly so cursor will be placed in visible part of topline. (Luuk van Baal) https://github.com/vim/vim/commit/bd28cae1f1c21c0e3743e3427c98bbd848fad237
Diffstat (limited to 'test/old/testdir/test_normal.vim')
-rw-r--r--test/old/testdir/test_normal.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index 013d8959ca..10fbf4125a 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -4220,4 +4220,19 @@ func Test_single_line_scroll()
call prop_type_delete(vt)
endfunc
+" Test for zb in buffer with a single line and filler lines
+func Test_single_line_filler_zb()
+ call setline(1, ['', 'foobar one two three'])
+ diffthis
+ new
+ call setline(1, ['foobar one two three'])
+ diffthis
+
+ " zb scrolls to reveal filler lines at the start of the buffer.
+ exe "normal \<C-E>zb"
+ call assert_equal(1, winsaveview().topfill)
+
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab nofoldenable