diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-05 22:51:49 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-06 00:18:02 -0500 |
commit | 3c764aabb5d4be71a5ea0d50bf8dae0a7285677f (patch) | |
tree | ac378578c34bdf175816d8e4939eb0364eb746d7 | |
parent | 1aacab49ea0e5cff94bd89595737b6af677f4490 (diff) | |
download | rneovim-3c764aabb5d4be71a5ea0d50bf8dae0a7285677f.tar.gz rneovim-3c764aabb5d4be71a5ea0d50bf8dae0a7285677f.tar.bz2 rneovim-3c764aabb5d4be71a5ea0d50bf8dae0a7285677f.zip |
vim-patch:8.1.1308: the Normal highlight is not defined when compiled with GUI
Problem: The Normal highlight is not defined when compiled with GUI.
Solution: Always define Normal. (Christian Brabandt, closes vim/vim#4072)
https://github.com/vim/vim/commit/f90b6e03a983b62b66564fc449e32724d6456769
-rw-r--r-- | runtime/doc/syntax.txt | 2 | ||||
-rw-r--r-- | src/nvim/syntax.c | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_highlight.vim | 7 | ||||
-rw-r--r-- | test/functional/ui/screen_basic_spec.lua | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 5424ad00ec..30ccb699cd 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4920,6 +4920,8 @@ Conceal placeholder characters substituted for concealed text (see 'conceallevel') *hl-Cursor* Cursor 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/nvim/syntax.c b/src/nvim/syntax.c index 61ee225eba..bcf133afda 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -5959,6 +5959,7 @@ static const char *highlight_init_both[] = { "IncSearch cterm=reverse gui=reverse", "ModeMsg cterm=bold gui=bold", "NonText ctermfg=Blue gui=bold guifg=Blue", + "Normal cterm=NONE gui=NONE", "PmenuSbar ctermbg=Grey guibg=Grey", "StatusLine cterm=reverse,bold gui=reverse,bold", "StatusLineNC cterm=reverse gui=reverse", @@ -6010,7 +6011,6 @@ static const char *highlight_init_light[] = { "Title ctermfg=DarkMagenta gui=bold guifg=Magenta", "Visual guibg=LightGrey", "WarningMsg ctermfg=DarkRed guifg=Red", - "Normal gui=NONE", NULL }; @@ -6044,7 +6044,6 @@ static const char *highlight_init_dark[] = { "Title ctermfg=LightMagenta gui=bold guifg=Magenta", "Visual guibg=DarkGrey", "WarningMsg ctermfg=LightRed guifg=Red", - "Normal gui=NONE", NULL }; diff --git a/src/nvim/testdir/test_highlight.vim b/src/nvim/testdir/test_highlight.vim index d94eb7c3a2..b9aeff0907 100644 --- a/src/nvim/testdir/test_highlight.vim +++ b/src/nvim/testdir/test_highlight.vim @@ -591,3 +591,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/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 150ee2a103..ff9f30d0a1 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -987,7 +987,7 @@ describe('Screen default colors', function() it('can be set to light', function() startup(true, false) screen:expect{condition=function() - eq({rgb_bg=Screen.colors.White, rgb_fg=0, rgb_sp=Screen.colors.Red, + eq({rgb_fg=Screen.colors.White, rgb_bg=0, rgb_sp=Screen.colors.Red, cterm_bg=0, cterm_fg=0}, screen.default_colors) end} end) |