summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_normal.vim
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2024-05-15 21:35:36 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-15 21:35:36 +0200
commiteff20eb35d2dba413c6d115291dd9ddea705e802 (patch)
treed3d42ccb48d254a6261ec6c40c7920ef6953dea7 /src/testdir/test_normal.vim
parentfed01960d2b0280339bba29183b1c3859366e805 (diff)
patch 9.1.0413: smoothscroll may cause infinite loopv9.1.0413
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: #14750 closes: #14772 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r--src/testdir/test_normal.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 5cbf681ea1..09ae42c167 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4268,4 +4268,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