diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-09 19:26:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-09 19:26:38 +0200 |
commit | f90b6e03a983b62b66564fc449e32724d6456769 (patch) | |
tree | e29d2d7e9000428efac5d10fa705f2359f655c7e | |
parent | a6c27c47ddf081859659d7de1caec675147e466b (diff) |
patch 8.1.1308: the Normal highlight is not defined when compiled with GUIv8.1.1308
Problem: The Normal highlight is not defined when compiled with GUI.
Solution: Always define Normal. (Christian Brabandt, closes #4072)
-rw-r--r-- | runtime/doc/syntax.txt | 2 | ||||
-rw-r--r-- | src/syntax.c | 7 | ||||
-rw-r--r-- | src/testdir/test_highlight.vim | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index c3ce75c89f..1eca1c5da8 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5002,6 +5002,8 @@ Conceal placeholder characters substituted for concealed text (see 'conceallevel') *hl-Cursor* Cursor the character under the cursor +lCursor the character under the cursor when |language-mapping| + is used (see 'guicursor') *hl-CursorIM* CursorIM like Cursor, but used when in IME mode |CursorIM| *hl-CursorColumn* diff --git a/src/syntax.c b/src/syntax.c index 537794a2d8..09491450ba 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -6865,6 +6865,7 @@ static char *(highlight_init_both[]) = { "lCursor guibg=fg guifg=bg", /* should be different, but what? */ #endif "default link QuickFixLine Search", + CENT("Normal cterm=NONE", "Normal gui=NONE"), NULL }; @@ -6946,9 +6947,6 @@ static char *(highlight_init_light[]) = { #endif CENT("MatchParen term=reverse ctermbg=Cyan", "MatchParen term=reverse ctermbg=Cyan guibg=Cyan"), -#ifdef FEAT_GUI - "Normal gui=NONE", -#endif #ifdef FEAT_TERMINAL CENT("StatusLineTerm term=reverse,bold cterm=bold ctermfg=White ctermbg=DarkGreen", "StatusLineTerm term=reverse,bold cterm=bold ctermfg=White ctermbg=DarkGreen gui=bold guifg=bg guibg=DarkGreen"), @@ -7042,9 +7040,6 @@ static char *(highlight_init_dark[]) = { CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey", "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"), #endif -#ifdef FEAT_GUI - "Normal gui=NONE", -#endif #ifdef FEAT_TERMINAL CENT("StatusLineTerm term=reverse,bold cterm=bold ctermfg=Black ctermbg=LightGreen", "StatusLineTerm term=reverse,bold cterm=bold ctermfg=Black ctermbg=LightGreen gui=bold guifg=bg guibg=LightGreen"), diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim index e16abf1837..24379d626e 100644 --- a/src/testdir/test_highlight.vim +++ b/src/testdir/test_highlight.vim @@ -572,3 +572,10 @@ func Test_cursorline_with_visualmode() call StopVimInTerminal(buf) call delete('Xtest_cursorline_with_visualmode') endfunc + +func Test_1_highlight_Normalgroup_exists() + " This test must come before the Test_cursorline test, as it appears this + " defines the Normal highlighting group anyway. + let hlNormal = HighlightArgs('Normal') + call assert_match('hi Normal\s*clear', hlNormal) +endfunc diff --git a/src/version.c b/src/version.c index ea04ff99c1..63cfd8df75 100644 --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1308, +/**/ 1307, /**/ 1306, |