aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-11-30 21:13:01 +0100
committerGitHub <noreply@github.com>2018-11-30 21:13:01 +0100
commit32a30d90b460048a43490a16d2e006d0e39b0e38 (patch)
tree470cc768df0a98d59b816d93eecf09c263a79813
parentb0ebf61d37ccae3c480834d2ac1b5559e7e3d20d (diff)
downloadrneovim-32a30d90b460048a43490a16d2e006d0e39b0e38.tar.gz
rneovim-32a30d90b460048a43490a16d2e006d0e39b0e38.tar.bz2
rneovim-32a30d90b460048a43490a16d2e006d0e39b0e38.zip
highlight: Fix missing .rgb_sp_color in initializers (#9287)
terminal_get_line_attributes() had this bug for a long time, though it likely had no effect visible to users. ref #9028 ref 60f845ca55a1
-rw-r--r--src/nvim/highlight.c1
-rw-r--r--src/nvim/terminal.c1
-rw-r--r--test/functional/core/main_spec.lua4
-rw-r--r--test/functional/terminal/highlight_spec.lua2
-rw-r--r--test/functional/terminal/tui_spec.lua14
-rw-r--r--test/functional/ui/highlight_spec.lua4
-rw-r--r--test/functional/ui/hlstate_spec.lua10
7 files changed, 19 insertions, 17 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c
index 12764e8059..5a9727f46e 100644
--- a/src/nvim/highlight.c
+++ b/src/nvim/highlight.c
@@ -188,6 +188,7 @@ int hl_get_underline(void)
.rgb_ae_attr = (int16_t)HL_UNDERLINE,
.rgb_fg_color = -1,
.rgb_bg_color = -1,
+ .rgb_sp_color = -1,
},
.kind = kHlUI,
.id1 = 0,
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 07722c68ac..f715344689 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -610,6 +610,7 @@ void terminal_get_line_attributes(Terminal *term, win_T *wp, int linenr,
.rgb_ae_attr = (int16_t)hl_attrs,
.rgb_fg_color = vt_fg,
.rgb_bg_color = vt_bg,
+ .rgb_sp_color = -1,
});
}
diff --git a/test/functional/core/main_spec.lua b/test/functional/core/main_spec.lua
index cd396ef820..a0981e9207 100644
--- a/test/functional/core/main_spec.lua
+++ b/test/functional/core/main_spec.lua
@@ -77,8 +77,8 @@ describe('Command-line option', function()
|
|
]], {
- [1] = {foreground = 4210943, special = Screen.colors.Grey0},
- [2] = {special = Screen.colors.Grey0, bold = true, reverse = true}
+ [1] = {foreground = 4210943},
+ [2] = {bold = true, reverse = true}
})
feed('i:cq<CR>')
screen:expect([[
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua
index fddc0bbb71..f33959c58d 100644
--- a/test/functional/terminal/highlight_spec.lua
+++ b/test/functional/terminal/highlight_spec.lua
@@ -120,7 +120,7 @@ describe('terminal window highlighting with custom palette', function()
clear()
screen = Screen.new(50, 7)
screen:set_default_attr_ids({
- [1] = {foreground = 1193046, special = Screen.colors.Black},
+ [1] = {foreground = tonumber('0x123456')},
[2] = {foreground = 12},
[3] = {bold = true, reverse = true},
[5] = {background = 11},
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index a47fed0442..1b4441f25f 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -207,14 +207,14 @@ describe('tui', function()
screen:set_option('rgb', true)
screen:set_default_attr_ids({
[1] = {reverse = true},
- [2] = {foreground = 13, special = Screen.colors.Grey0},
- [3] = {bold = true, reverse = true, special = Screen.colors.Grey0},
+ [2] = {foreground = 13},
+ [3] = {bold = true, reverse = true},
[4] = {bold = true},
- [5] = {special = Screen.colors.Grey0, reverse = true, foreground = 4},
- [6] = {foreground = 4, special = Screen.colors.Grey0},
- [7] = {special = Screen.colors.Grey0, reverse = true, foreground = Screen.colors.SeaGreen4},
- [8] = {foreground = Screen.colors.SeaGreen4, special = Screen.colors.Grey0},
- [9] = {special = Screen.colors.Grey0, bold = true, foreground = Screen.colors.Blue1},
+ [5] = {reverse = true, foreground = 4},
+ [6] = {foreground = 4},
+ [7] = {reverse = true, foreground = Screen.colors.SeaGreen4},
+ [8] = {foreground = Screen.colors.SeaGreen4},
+ [9] = {bold = true, foreground = Screen.colors.Blue1},
})
feed_data(':hi SpecialKey ctermfg=3 guifg=SeaGreen\n')
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index f996acc9be..96f6b43320 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -797,9 +797,9 @@ describe('CursorLine highlight', function()
[8] = {bold = true, foreground = Screen.colors.Blue1},
[9] = {bold = true, reverse = true},
[10] = {bold = true},
- [11] = {special = Screen.colors.Grey0, underline = true,
+ [11] = {underline = true,
background = Screen.colors.LightMagenta},
- [12] = {bold = true, underline = true, special = Screen.colors.Grey0,
+ [12] = {bold = true, underline = true,
background = Screen.colors.Red},
})
end)
diff --git a/test/functional/ui/hlstate_spec.lua b/test/functional/ui/hlstate_spec.lua
index 672af5fb22..775b701438 100644
--- a/test/functional/ui/hlstate_spec.lua
+++ b/test/functional/ui/hlstate_spec.lua
@@ -177,11 +177,11 @@ describe('ext_hlstate detailed highlights', function()
it("work with :terminal", function()
screen:set_default_attr_ids({
[1] = {{}, {{hi_name = "TermCursorNC", ui_name = "TermCursorNC", kind = "ui"}}},
- [2] = {{special = Screen.colors.Grey0, foreground = 52479}, {{kind = "term"}}},
- [3] = {{special = Screen.colors.Grey0, bold = true, foreground = 52479}, {{kind = "term"}}},
- [4] = {{special = Screen.colors.Grey0, foreground = 52479}, {2, 1}},
- [5] = {{special = Screen.colors.Grey0, foreground = 4259839}, {{kind = "term"}}},
- [6] = {{special = Screen.colors.Grey0, foreground = 4259839}, {5, 1}},
+ [2] = {{foreground = 52479}, {{kind = "term"}}},
+ [3] = {{bold = true, foreground = 52479}, {{kind = "term"}}},
+ [4] = {{foreground = 52479}, {2, 1}},
+ [5] = {{foreground = 4259839}, {{kind = "term"}}},
+ [6] = {{foreground = 4259839}, {5, 1}},
})
command('enew | call termopen(["'..nvim_dir..'/tty-test"])')
screen:expect([[