diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-02 06:55:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-01 22:55:43 +0000 |
commit | 0e484c2041f9196f61c2b5dfaed38e81d068680d (patch) | |
tree | edee0fe4f8dcda5844502e3e062c161cca098307 /test/old/testdir | |
parent | 5331f87f6145f705c73c5c23f365cecb9fbc5067 (diff) | |
download | rneovim-0e484c2041f9196f61c2b5dfaed38e81d068680d.tar.gz rneovim-0e484c2041f9196f61c2b5dfaed38e81d068680d.tar.bz2 rneovim-0e484c2041f9196f61c2b5dfaed38e81d068680d.zip |
vim-patch:9.1.0753: Wrong display when typing in diff mode with 'smoothscroll' (#30614)
Problem: Wrong display when typing in diff mode with 'smoothscroll'.
Solution: Use adjust_plines_for_skipcol() (zeertzjq).
closes: vim/vim#15776
https://github.com/vim/vim/commit/47f8584a80006cd25e7dc6fa7fb1bfe2e768403c
Diffstat (limited to 'test/old/testdir')
-rw-r--r-- | test/old/testdir/test_scroll_opt.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim index 5bf071903b..55f9a32718 100644 --- a/test/old/testdir/test_scroll_opt.vim +++ b/test/old/testdir/test_scroll_opt.vim @@ -302,6 +302,36 @@ func Test_smoothscroll_diff_mode() call StopVimInTerminal(buf) endfunc +func Test_smoothscroll_diff_change_line() + CheckScreendump + + let lines =<< trim END + set diffopt+=followwrap smoothscroll + call setline(1, repeat(' abc', &columns)) + call setline(2, 'bar') + call setline(3, repeat(' abc', &columns)) + vnew + call setline(1, repeat(' abc', &columns)) + call setline(2, 'foo') + call setline(3, 'bar') + call setline(4, repeat(' abc', &columns)) + windo exe "normal! 2gg5\<C-E>" + windo diffthis + END + call writefile(lines, 'XSmoothDiffChangeLine', 'D') + let buf = RunVimInTerminal('-S XSmoothDiffChangeLine', #{rows: 20, columns: 55}) + + call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_1', {}) + call term_sendkeys(buf, "Abar") + call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_2', {}) + call term_sendkeys(buf, "\<Esc>") + call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_3', {}) + call term_sendkeys(buf, "yyp") + call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_4', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_smoothscroll_wrap_scrolloff_zero() CheckScreendump |