diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-05 19:07:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-05 19:07:21 +0100 |
commit | fabc3ca896751277f18a3a68e5661179728db3ad (patch) | |
tree | ca34187afd2c6247d7a9139edb3146317472594a /src/testdir | |
parent | b4d16cb11d92b363503b71673921774548230e94 (diff) | |
download | vim-git-fabc3ca896751277f18a3a68e5661179728db3ad.tar.gz |
patch 8.2.1957: diff and cursorcolumn highlighting don't mixv8.2.1957
Problem: Diff and cursorcolumn highlighting don't mix.
Solution: Fix condition for what attribute to use. (Christian Brabandt,
closes #7258, closes #7260)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_diff_cuc_01.dump | 20 | ||||
-rw-r--r-- | src/testdir/dumps/Test_diff_cuc_02.dump | 20 | ||||
-rw-r--r-- | src/testdir/dumps/Test_diff_cuc_03.dump | 20 | ||||
-rw-r--r-- | src/testdir/dumps/Test_diff_cuc_04.dump | 20 | ||||
-rw-r--r-- | src/testdir/test_diffmode.vim | 33 |
5 files changed, 113 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_diff_cuc_01.dump b/src/testdir/dumps/Test_diff_cuc_01.dump new file mode 100644 index 000000000..19c42f4e5 --- /dev/null +++ b/src/testdir/dumps/Test_diff_cuc_01.dump @@ -0,0 +1,20 @@ +>a+0&#ffffff0@1| @34||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32 +|-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32 +|c+0&#e0e0e08|c+0&#ffffff0| @34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32 +|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/dumps/Test_diff_cuc_02.dump b/src/testdir/dumps/Test_diff_cuc_02.dump new file mode 100644 index 000000000..80a296cf5 --- /dev/null +++ b/src/testdir/dumps/Test_diff_cuc_02.dump @@ -0,0 +1,20 @@ +|a+0&#ffffff0>a| @34||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32 +|-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32 +|c+0&#ffffff0|c+0&#e0e0e08| +0&#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32 +|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|2| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|2| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/dumps/Test_diff_cuc_03.dump b/src/testdir/dumps/Test_diff_cuc_03.dump new file mode 100644 index 000000000..19a3c1f8e --- /dev/null +++ b/src/testdir/dumps/Test_diff_cuc_03.dump @@ -0,0 +1,20 @@ +|a+0&#e0e0e08|a+0&#ffffff0| @34||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32 +|-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32 +>c+0&#ffffff0@1| @34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32 +|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|1| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/dumps/Test_diff_cuc_04.dump b/src/testdir/dumps/Test_diff_cuc_04.dump new file mode 100644 index 000000000..ba29893ae --- /dev/null +++ b/src/testdir/dumps/Test_diff_cuc_04.dump @@ -0,0 +1,20 @@ +|a+0&#ffffff0|a+0&#e0e0e08| +0&#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32 +|-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32 +|c+0&#ffffff0>c| @34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32 +|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|~| @35||+1#0000000&|~+0#4040ff13&| @35 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|2| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|2| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 770dde053..aba9c9a4c 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -1150,4 +1150,37 @@ 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 |