diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-05-16 21:31:10 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-05-17 20:28:14 +0200 |
commit | f178b8ba4963345879c3a1291ab81805d17c2e0e (patch) | |
tree | 10758be1c958f804c20ddd67ef3e407b5de09104 /test/old | |
parent | 50749f8df89d7a74ea17d51b28e737e043ac6c51 (diff) | |
download | rneovim-f178b8ba4963345879c3a1291ab81805d17c2e0e.tar.gz rneovim-f178b8ba4963345879c3a1291ab81805d17c2e0e.tar.bz2 rneovim-f178b8ba4963345879c3a1291ab81805d17c2e0e.zip |
vim-patch:9.1.0414: Unable to leave long line with 'smoothscroll' and 'scrolloff'
Problem: Unable to leave long line with 'smoothscroll' and 'scrolloff'.
Corrupted screen near the end of a long line with 'scrolloff'.
(Ernie Rael, after 9.1.0280)
Solution: Only correct cursor in case scroll_cursor_bot() was not itself
called to make the cursor visible. Avoid adjusting for
'scrolloff' beyond the text line height (Luuk van Baal)
https://github.com/vim/vim/commit/b32055e504ebd4f6183a93b92b08d61dad61c841
vim-patch:9.1.0416: some screen dump tests can be improved
Problem: some screen dump tests can be improved (after 9.1.0414)
Solution: Make sure screen state changes properly and is captured in the
screen dumps (Luuk van Baal)
https://github.com/vim/vim/commit/2e642734f4be506483315b8881748a7ef45854f4
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_scroll_opt.vim | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim index c7b986e040..76b4089bd1 100644 --- a/test/old/testdir/test_scroll_opt.vim +++ b/test/old/testdir/test_scroll_opt.vim @@ -1156,4 +1156,39 @@ func Test_smoothscroll_long_line_zb() bwipe! endfunc +func Test_smooth_long_scrolloff() + CheckScreendump + + let lines =<< trim END + set smoothscroll scrolloff=3 + call setline(1, ['one', 'two long '->repeat(100), 'three', 'four', 'five', 'six']) + END + call writefile(lines, 'XSmoothLongScrolloff', 'D') + let buf = RunVimInTerminal('-u NONE -S XSmoothLongScrolloff', #{rows: 8, cols: 40}) + "FIXME: empty screen due to reset_skipcol()/curs_columns() shenanigans + call term_sendkeys(buf, ":norm j721|\<CR>") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_1', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_2', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_3', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_4', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_5', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_6', {}) + + call term_sendkeys(buf, "gk") + "FIXME: empty screen due to reset_skipcol()/curs_columns() shenanigans + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_7', {}) + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |