aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorJaehwang Jerry Jung <tomtomjhj@gmail.com>2021-09-19 01:38:58 +0900
committerGitHub <noreply@github.com>2021-09-18 12:38:58 -0400
commitde406f651c6f926db4223b69ef312777e8afe01b (patch)
treec9f601e7a987e9c94493c7157b8dd6a43d421093 /src/nvim/testdir/test_diffmode.vim
parent51a98aa0c2fe3231a0ffc8a78189bc6fafd6abf6 (diff)
downloadrneovim-de406f651c6f926db4223b69ef312777e8afe01b.tar.gz
rneovim-de406f651c6f926db4223b69ef312777e8afe01b.tar.bz2
rneovim-de406f651c6f926db4223b69ef312777e8afe01b.zip
vim-patch:8.2.3394: filler lines are wrong when changing text in diff mode (#15547)
Problem: Filler lines are wrong when changing text in diff mode. Solution: Don't change the filler lines on every change. Check scrollbinding when updating the filler lines. (closes vim/vim#8809) https://github.com/vim/vim/commit/04626c243c47af91c2580eaf23e12286180e0e81
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index efa7f552e0..32cee7ca56 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -965,6 +965,30 @@ func Test_diff_screen()
call delete('XdiffSetup')
endfunc
+func Test_diff_with_scroll_and_change()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, range(1, 15))
+ vnew
+ call setline(1, range(9, 15))
+ windo diffthis
+ wincmd h
+ exe "normal Gl5\<C-E>"
+ END
+ call writefile(lines, 'Xtest_scroll_change')
+ let buf = RunVimInTerminal('-S Xtest_scroll_change', {})
+
+ call VerifyScreenDump(buf, 'Test_diff_scroll_change_01', {})
+
+ call term_sendkeys(buf, "ax\<Esc>")
+ call VerifyScreenDump(buf, 'Test_diff_scroll_change_02', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_scroll_change')
+endfunc
+
func Test_diff_with_cursorline()
CheckScreendump