diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-06 14:57:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-06 14:57:53 +0100 |
commit | 9bab7a024393200bb2c03b3abddfda86436990a7 (patch) | |
tree | b5a76b2251daed2bbd2ef703b0e61341d1582346 /src/testdir/test_scroll_opt.vim | |
parent | 1a58e1d97cfc72e501cbf63ad75f46f1bb4c8da2 (diff) | |
download | vim-git-9bab7a024393200bb2c03b3abddfda86436990a7.tar.gz |
patch 9.0.0672: line partly shows with 'smoothscroll' and 'scrolloff' zerov9.0.0672
Problem: Cursor line only partly shows with 'smoothscroll' and 'scrolloff'
zero.
Solution: Do not use 'smoothscroll' when adjusting the bottom of the window.
(closes #11269)
Diffstat (limited to 'src/testdir/test_scroll_opt.vim')
-rw-r--r-- | src/testdir/test_scroll_opt.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim index b114fe360..d11d0be0f 100644 --- a/src/testdir/test_scroll_opt.vim +++ b/src/testdir/test_scroll_opt.vim @@ -167,6 +167,31 @@ func Test_smoothscroll_diff_mode() call StopVimInTerminal(buf) endfunc +func Test_smoothscroll_wrap_scrolloff_zero() + CheckScreendump + + let lines =<< trim END + vim9script + setline(1, ['Line' .. (' with some text'->repeat(7))]->repeat(7)) + set smoothscroll scrolloff=0 + :3 + END + call writefile(lines, 'XSmoothWrap', 'D') + let buf = RunVimInTerminal('-S XSmoothWrap', #{rows: 8, cols: 40}) + + call VerifyScreenDump(buf, 'Test_smooth_wrap_1', {}) + + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_smooth_wrap_2', {}) + + call term_sendkeys(buf, "\<C-E>j") + call VerifyScreenDump(buf, 'Test_smooth_wrap_3', {}) + + call term_sendkeys(buf, "G") + call VerifyScreenDump(buf, 'Test_smooth_wrap_4', {}) + + call StopVimInTerminal(buf) +endfunc " vim: shiftwidth=2 sts=2 expandtab |