From aafdfa61bb0af95e98ca825d1f7839801c22d434 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 09:39:57 +0200 Subject: Merging upstream version 2:9.1.0199. Signed-off-by: Daniel Baumann --- src/testdir/test_highlight.vim | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'src/testdir/test_highlight.vim') 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=[27h;[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': ''}]) -- cgit v1.2.3