aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-24 16:59:14 -0400
committerGitHub <noreply@github.com>2021-05-24 16:59:14 -0400
commita282a177d3320db25fa8f854cbcdbe0bc6abde7f (patch)
tree137f0f1babdd1fc776f4b63a275604f7c526841d /src/nvim/testdir/test_diffmode.vim
parent0a653f7ab98dfc05bf0532b9f81bc19377031900 (diff)
parent370e65ed7cb299b49306e96f13cf6b5c7f717a6c (diff)
downloadrneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.tar.gz
rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.tar.bz2
rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.zip
Merge pull request #14634 from janlazo/vim-8.2.2880
vim-patch:8.2.{511,1689,1957,2880,2884}
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 1ade11a8ed..8592f48af7 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -802,6 +802,7 @@ func VerifyBoth(buf, dumpfile, extra)
" also test unified diff
call term_sendkeys(a:buf, ":call SetupUnified()\<CR>:")
+ call term_sendkeys(a:buf, ":redraw!\<CR>:")
call VerifyScreenDump(a:buf, a:dumpfile, {}, 'unified')
call term_sendkeys(a:buf, ":call StopUnified()\<CR>:")
endfunc
@@ -823,10 +824,11 @@ func Test_diff_screen()
func UnifiedDiffExpr()
" Prepend some text to check diff type detection
call writefile(['warning', ' message'], v:fname_out)
- silent exe '!diff -u ' .. v:fname_in .. ' ' .. v:fname_new .. '>>' .. v:fname_out
+ silent exe '!diff -U0 ' .. v:fname_in .. ' ' .. v:fname_new .. '>>' .. v:fname_out
endfunc
func SetupUnified()
set diffexpr=UnifiedDiffExpr()
+ diffupdate
endfunc
func StopUnified()
set diffexpr=
@@ -1146,4 +1148,38 @@ func Test_diff_and_scroll()
set ls&
endfunc
+func Test_diff_filler_cursorcolumn()
+ CheckScreendump
+
+ let content =<< trim END
+ call setline(1, ['aa', 'bb', 'cc'])
+ vnew
+ call setline(1, ['aa', 'cc'])
+ windo diffthis
+ wincmd p
+ setlocal cursorcolumn foldcolumn=0
+ norm! gg0
+ redraw!
+ END
+ call writefile(content, 'Xtest_diff_cuc')
+ let buf = RunVimInTerminal('-S Xtest_diff_cuc', {})
+
+ call VerifyScreenDump(buf, 'Test_diff_cuc_01', {})
+
+ call term_sendkeys(buf, "l")
+ call term_sendkeys(buf, "\<C-l>")
+ call VerifyScreenDump(buf, 'Test_diff_cuc_02', {})
+ call term_sendkeys(buf, "0j")
+ call term_sendkeys(buf, "\<C-l>")
+ call VerifyScreenDump(buf, 'Test_diff_cuc_03', {})
+ call term_sendkeys(buf, "l")
+ call term_sendkeys(buf, "\<C-l>")
+ call VerifyScreenDump(buf, 'Test_diff_cuc_04', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_cuc')
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab