summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_highlight.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /src/testdir/test_highlight.vim
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_highlight.vim')
-rw-r--r--src/testdir/test_highlight.vim28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index af60503..d6c9f50 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -557,22 +557,23 @@ func Test_cursorline_after_yank()
call StopVimInTerminal(buf)
endfunc
-" test for issue #4862
+" Test for issue #4862: pasting above 'cursorline' redraws properly.
func Test_put_before_cursorline()
new
only!
- call setline(1, 'A')
+ call setline(1, ['A', 'B', 'C'])
+ call cursor(2, 1)
redraw
- let std_attr = screenattr(1, 1)
+ let std_attr = screenattr(2, 1)
set cursorline
redraw
- let cul_attr = screenattr(1, 1)
+ let cul_attr = screenattr(2, 1)
normal yyP
redraw
- " Line 1 has cursor so it should be highlighted with CursorLine.
- call assert_equal(cul_attr, screenattr(1, 1))
- " And CursorLine highlighting from the second line should be gone.
- call assert_equal(std_attr, screenattr(2, 1))
+ " Line 2 has cursor so it should be highlighted with CursorLine.
+ call assert_equal(cul_attr, screenattr(2, 1))
+ " And CursorLine highlighting from line 3 should be gone.
+ call assert_equal(std_attr, screenattr(3, 1))
set nocursorline
bwipe!
endfunc
@@ -888,6 +889,16 @@ func Test_highlight_ctermul()
highlight Normal ctermul=NONE
endfunc
+" Test for 'ctermfont' in a highlight group
+func Test_highlight_ctermfont()
+ CheckNotGui
+ call assert_notmatch('ctermfont=', HighlightArgs('Normal'))
+ highlight Normal ctermfont=3
+ call assert_match('ctermfont=3', HighlightArgs('Normal'))
+ call assert_equal('3', synIDattr(synIDtrans(hlID('Normal')), 'font'))
+ highlight Normal ctermfont=NONE
+endfunc
+
" Test for specifying 'start' and 'stop' in a highlight group
func Test_highlight_start_stop()
hi HlGrp1 start=<Esc>[27h;<Esc>[<Space>r;
@@ -1314,6 +1325,7 @@ func Test_hlset()
call hlset([{'name': 'hlg11', 'ctermfg': ''}])
call hlset([{'name': 'hlg11', 'ctermbg': ''}])
call hlset([{'name': 'hlg11', 'ctermul': ''}])
+ call hlset([{'name': 'hlg11', 'ctermfont': ''}])
call hlset([{'name': 'hlg11', 'font': ''}])
call hlset([{'name': 'hlg11', 'gui': {}}])
call hlset([{'name': 'hlg11', 'guifg': ''}])