aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-16 05:36:24 +0800
committerGitHub <noreply@github.com>2024-05-16 05:36:24 +0800
commitacaac07b64d9549553470ae273acecf888f67787 (patch)
tree6b2f2a2075187181d8f83512bda43e0a01aecb7f /test
parentcdd87222c86c5b2274a13d36f23de0637462e317 (diff)
downloadrneovim-acaac07b64d9549553470ae273acecf888f67787.tar.gz
rneovim-acaac07b64d9549553470ae273acecf888f67787.tar.bz2
rneovim-acaac07b64d9549553470ae273acecf888f67787.zip
vim-patch:9.1.0413: smoothscroll may cause infinite loop (#28763)
Problem: smoothscroll may cause infinite loop, with very narrow windows (Jaehwang Jung, after v9.1.0280) Solution: Check for width1 being negative, verify that win_linetabsize does not overflow fixes: vim/vim#14750 closes: vim/vim#14772 https://github.com/vim/vim/commit/eff20eb35d2dba413c6d115291dd9ddea705e802 Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_normal.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index 0336e43902..a2ef07193d 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -4278,4 +4278,14 @@ func Test_halfpage_longline()
call assert_equal(2, line('.'))
bwipe!
endfunc
+
+" Test for Ctrl-E with long line and very narrow window,
+" used to cause an inifite loop
+func Test_scroll_longline_no_loop()
+ 4vnew
+ setl smoothscroll number showbreak=> scrolloff=2
+ call setline(1, repeat(['Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'], 3))
+ exe "normal! \<C-E>"
+ bwipe!
+endfunc
" vim: shiftwidth=2 sts=2 expandtab nofoldenable