summaryrefslogtreecommitdiff
path: root/src/testdir/test_highlight.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-15 20:52:26 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-15 20:52:26 +0200
commitad5e5631c5dc93a50bbe637be254c5e9968848ea (patch)
tree1e45c995ab1ef7772891db27cccf65dc26232a2a /src/testdir/test_highlight.vim
parentc8f12c9856df58c760fe54d81b2ec5ed4dcaffd6 (diff)
downloadvim-git-ad5e5631c5dc93a50bbe637be254c5e9968848ea.tar.gz
patch 8.2.1689: 'colorcolumn' doesn't show in indentv8.2.1689
Problem: 'colorcolumn' doesn't show in indent. Solution: Also draw the column when draw_state is WL_BRI or WL_SBR. (Alexey Demin, closes #6948, closes #6619)
Diffstat (limited to 'src/testdir/test_highlight.vim')
-rw-r--r--src/testdir/test_highlight.vim36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index b5e382f1a..4f2e238e4 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -662,6 +662,42 @@ func Test_colorcolumn()
call delete('Xtest_colorcolumn')
endfunc
+func Test_colorcolumn_bri()
+ CheckScreendump
+
+ " check 'colorcolumn' when 'breakindent' is set
+ let lines =<< trim END
+ call setline(1, 'The quick brown fox jumped over the lazy dogs')
+ END
+ call writefile(lines, 'Xtest_colorcolumn_bri')
+ let buf = RunVimInTerminal('-S Xtest_colorcolumn_bri', {'rows': 10,'columns': 40})
+ call term_sendkeys(buf, ":set co=40 linebreak bri briopt=shift:2 cc=40,41,43\<CR>")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_colorcolumn_2', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_colorcolumn_bri')
+endfunc
+
+func Test_colorcolumn_sbr()
+ CheckScreendump
+
+ " check 'colorcolumn' when 'showbreak' is set
+ let lines =<< trim END
+ call setline(1, 'The quick brown fox jumped over the lazy dogs')
+ END
+ call writefile(lines, 'Xtest_colorcolumn_srb')
+ let buf = RunVimInTerminal('-S Xtest_colorcolumn_srb', {'rows': 10,'columns': 40})
+ call term_sendkeys(buf, ":set co=40 showbreak=+++>\\ cc=40,41,43\<CR>")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_colorcolumn_3', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_colorcolumn_srb')
+endfunc
+
" This test must come before the Test_cursorline test, as it appears this
" defines the Normal highlighting group anyway.
func Test_1_highlight_Normalgroup_exists()