summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_scroll_opt.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-03 18:35:07 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-03 18:35:07 +0000
commitb21b8e9ed081a6ef6b6745fe65d219b3ac046c3b (patch)
tree9f72821277ed5f65df1c6ed76473d714fb4aa197 /src/testdir/test_scroll_opt.vim
parentc0370529c027abc5b1698d53fcfb8c02a0c515da (diff)
patch 9.0.1000: with 'smoothscroll' skipcol may be reset unnecessarilyv9.0.1000
Problem: With 'smoothscroll' skipcol may be reset unnecessarily. Solution: Check the line does actually fit in the window.
Diffstat (limited to 'src/testdir/test_scroll_opt.vim')
-rw-r--r--src/testdir/test_scroll_opt.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index 6f8693ba73..58a8bf4f9e 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -481,6 +481,13 @@ func Test_smoothscroll_cursor_scrolloff()
exe "normal 20h"
call s:check_col_calc(1, 4, 61)
+ " cursor on last line, "gk" should not cause a scroll
+ set scrolloff=0
+ normal G0
+ call s:check_col_calc(1, 7, 1)
+ normal gk
+ call s:check_col_calc(1, 6, 101)
+
bwipe!
endfunc