aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-15 07:49:39 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-02-15 10:50:29 +0800
commit31b3c62845fe7da41eed0089990e1540b9a41053 (patch)
treeec37101abea724286967f973bd3bf73fe432bd0d
parent440ce0d2462677685d2f981ad3e928c28526e6d3 (diff)
downloadrneovim-31b3c62845fe7da41eed0089990e1540b9a41053.tar.gz
rneovim-31b3c62845fe7da41eed0089990e1540b9a41053.tar.bz2
rneovim-31b3c62845fe7da41eed0089990e1540b9a41053.zip
vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'
Problem: Visual highlight hard to read with 'termguicolors' (Maxim Kim) Solution: Set Visual GUI foreground to black (with background=light) and lightgrey (with background=dark) (Maxim Kim) fixes: vim/vim#14024 closes: vim/vim#14025 https://github.com/vim/vim/commit/34e4a05d02a016fe230495be8f6c60ddd56f9567 Co-authored-by: Maxim Kim <habamax@gmail.com>
-rw-r--r--runtime/colors/vim.lua4
-rw-r--r--test/functional/ex_cmds/cmd_map_spec.lua2
-rw-r--r--test/functional/legacy/breakindent_spec.lua2
-rw-r--r--test/functional/legacy/display_spec.lua2
-rw-r--r--test/functional/legacy/highlight_spec.lua2
-rw-r--r--test/functional/legacy/listlbr_spec.lua2
-rw-r--r--test/functional/legacy/listlbr_utf8_spec.lua2
-rw-r--r--test/functional/legacy/matchparen_spec.lua2
-rw-r--r--test/functional/legacy/search_spec.lua4
-rw-r--r--test/functional/legacy/statusline_spec.lua2
-rw-r--r--test/functional/legacy/tabline_spec.lua2
-rw-r--r--test/functional/legacy/visual_spec.lua2
-rw-r--r--test/functional/ui/bufhl_spec.lua2
-rw-r--r--test/functional/ui/cmdline_spec.lua2
-rw-r--r--test/functional/ui/decorations_spec.lua53
-rw-r--r--test/functional/ui/float_spec.lua8
-rw-r--r--test/functional/ui/fold_spec.lua8
-rw-r--r--test/functional/ui/highlight_spec.lua53
-rw-r--r--test/functional/ui/mouse_spec.lua4
-rw-r--r--test/functional/ui/multigrid_spec.lua2
-rw-r--r--test/functional/ui/syntax_conceal_spec.lua2
-rw-r--r--test/functional/ui/winbar_spec.lua2
22 files changed, 73 insertions, 91 deletions
diff --git a/runtime/colors/vim.lua b/runtime/colors/vim.lua
index 53b232eeb5..5a29ba0ec6 100644
--- a/runtime/colors/vim.lua
+++ b/runtime/colors/vim.lua
@@ -231,7 +231,7 @@ if vim.o.background == 'light' then
hi('SpellRare', { sp = 'Magenta', undercurl = true, ctermbg = 'LightMagenta' })
hi('TabLine', { bg = 'LightGrey', underline = true, ctermfg = 'Black', ctermbg = 'LightGrey', cterm = { underline = true } })
hi('Title', { fg = 'Magenta', bold = true, ctermfg = 'DarkMagenta' })
- hi('Visual', { bg = 'LightGrey', ctermfg = 'Black', ctermbg = 'Grey' })
+ hi('Visual', { fg = 'Black', bg = 'LightGrey', ctermfg = 'Black', ctermbg = 'Grey' })
hi('WarningMsg', { fg = 'Red', ctermfg = 'DarkRed' })
hi('Comment', { fg = 'Blue', ctermfg = 'DarkBlue' })
hi('Constant', { fg = 'Magenta', ctermfg = 'DarkRed' })
@@ -270,7 +270,7 @@ else
hi('SpellRare', { sp = 'Magenta', undercurl = true, ctermbg = 'Magenta' })
hi('TabLine', { bg = 'DarkGrey', underline = true, ctermfg = 'White', ctermbg = 'DarkGrey', cterm = { underline = true } })
hi('Title', { fg = 'Magenta', bold = true, ctermfg = 'LightMagenta' })
- hi('Visual', { bg = '#575757', ctermfg = 'Black', ctermbg = 'Grey' })
+ hi('Visual', { fg = 'LightGrey', bg = '#575757', ctermfg = 'Black', ctermbg = 'Grey' })
hi('WarningMsg', { fg = 'Red', ctermfg = 'LightRed' })
hi('Comment', { fg = '#80a0ff', ctermfg = 'Cyan' })
hi('Constant', { fg = '#ffa0a0', ctermfg = 'Magenta' })
diff --git a/test/functional/ex_cmds/cmd_map_spec.lua b/test/functional/ex_cmds/cmd_map_spec.lua
index da7d686e5b..cb7d7340e2 100644
--- a/test/functional/ex_cmds/cmd_map_spec.lua
+++ b/test/functional/ex_cmds/cmd_map_spec.lua
@@ -28,7 +28,7 @@ describe('mappings with <Cmd>', function()
[2] = { foreground = Screen.colors.Grey100, background = Screen.colors.Red },
[3] = { bold = true, foreground = Screen.colors.SeaGreen4 },
[4] = { bold = true },
- [5] = { background = Screen.colors.LightGrey },
+ [5] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
[6] = { foreground = Screen.colors.Blue1 },
[7] = { bold = true, reverse = true },
[8] = { background = Screen.colors.WebGray },
diff --git a/test/functional/legacy/breakindent_spec.lua b/test/functional/legacy/breakindent_spec.lua
index 274fdfe2e2..cf0065f394 100644
--- a/test/functional/legacy/breakindent_spec.lua
+++ b/test/functional/legacy/breakindent_spec.lua
@@ -69,7 +69,7 @@ describe('breakindent', function()
]])
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [1] = { background = Screen.colors.LightGrey }, -- Visual
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[2] = { bold = true, reverse = true }, -- StatusLine
[3] = { reverse = true }, -- StatusLineNC
[4] = { bold = true }, -- ModeMsg
diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua
index b44e1fd601..153fad2e22 100644
--- a/test/functional/legacy/display_spec.lua
+++ b/test/functional/legacy/display_spec.lua
@@ -33,7 +33,7 @@ describe('display', function()
screen:attach()
screen:set_default_attr_ids({
[1] = { bold = true }, -- ModeMsg
- [2] = { background = Screen.colors.LightGrey }, -- Visual
+ [2] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[3] = { background = Screen.colors.Grey, foreground = Screen.colors.DarkBlue }, -- SignColumn
})
diff --git a/test/functional/legacy/highlight_spec.lua b/test/functional/legacy/highlight_spec.lua
index 2416477673..3d06bf3978 100644
--- a/test/functional/legacy/highlight_spec.lua
+++ b/test/functional/legacy/highlight_spec.lua
@@ -101,7 +101,7 @@ describe('Visual selection highlight', function()
local screen = Screen.new(60, 6)
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [1] = { background = Screen.colors.LightGrey }, -- Visual
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[2] = { bold = true }, -- ModeMsg
})
screen:attach()
diff --git a/test/functional/legacy/listlbr_spec.lua b/test/functional/legacy/listlbr_spec.lua
index fb5fb24380..50628e5ef9 100644
--- a/test/functional/legacy/listlbr_spec.lua
+++ b/test/functional/legacy/listlbr_spec.lua
@@ -206,7 +206,7 @@ describe('listlbr', function()
local screen = Screen.new(60, 6)
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [1] = { background = Screen.colors.LightGrey }, -- Visual
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[2] = { background = Screen.colors.Red, foreground = Screen.colors.White }, -- ErrorMsg
})
screen:attach()
diff --git a/test/functional/legacy/listlbr_utf8_spec.lua b/test/functional/legacy/listlbr_utf8_spec.lua
index 2788e7ae9f..8e5d9b88bc 100644
--- a/test/functional/legacy/listlbr_utf8_spec.lua
+++ b/test/functional/legacy/listlbr_utf8_spec.lua
@@ -216,7 +216,7 @@ describe('linebreak', function()
local screen = Screen.new(60, 8)
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [1] = { background = Screen.colors.LightGrey }, -- Visual
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[2] = { bold = true }, -- ModeMsg
})
screen:attach()
diff --git a/test/functional/legacy/matchparen_spec.lua b/test/functional/legacy/matchparen_spec.lua
index bdc6cb77a2..b03107deb0 100644
--- a/test/functional/legacy/matchparen_spec.lua
+++ b/test/functional/legacy/matchparen_spec.lua
@@ -14,7 +14,7 @@ describe('matchparen', function()
screen:attach()
screen:set_default_attr_ids({
[1] = { bold = true },
- [2] = { background = Screen.colors.LightGrey },
+ [2] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black },
})
exec([[
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua
index 70748c9d27..2fda341123 100644
--- a/test/functional/legacy/search_spec.lua
+++ b/test/functional/legacy/search_spec.lua
@@ -772,9 +772,9 @@ describe('Search highlight', function()
screen:set_default_attr_ids({
[1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
[2] = { bold = true }, -- ModeMsg, Search
- [3] = { background = Screen.colors.LightGrey }, -- Visual
+ [3] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[4] = { background = Screen.colors.Yellow, bold = true }, -- Search
- [5] = { background = Screen.colors.LightGrey, bold = true }, -- Visual + Search
+ [5] = { background = Screen.colors.LightGrey, bold = true, foreground = Screen.colors.Black },
})
screen:attach()
exec([[
diff --git a/test/functional/legacy/statusline_spec.lua b/test/functional/legacy/statusline_spec.lua
index 1330d63dbd..567e829879 100644
--- a/test/functional/legacy/statusline_spec.lua
+++ b/test/functional/legacy/statusline_spec.lua
@@ -70,7 +70,7 @@ describe('statusline', function()
it('showcmdloc=statusline works', function()
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [1] = { background = Screen.colors.LightGrey }, -- Visual
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[2] = { bold = true }, -- MoreMsg
[3] = { bold = true, reverse = true }, -- StatusLine
[5] = { background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue }, -- Folded
diff --git a/test/functional/legacy/tabline_spec.lua b/test/functional/legacy/tabline_spec.lua
index 07e64d1d4a..683c7d9bd7 100644
--- a/test/functional/legacy/tabline_spec.lua
+++ b/test/functional/legacy/tabline_spec.lua
@@ -18,7 +18,7 @@ describe('tabline', function()
it('showcmdloc=tabline works', function()
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [1] = { background = Screen.colors.LightGrey }, -- Visual
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
[2] = { bold = true }, -- MoreMsg, TabLineSel
[3] = { reverse = true }, -- TabLineFill
[4] = { background = Screen.colors.LightGrey, underline = true }, -- TabLine
diff --git a/test/functional/legacy/visual_spec.lua b/test/functional/legacy/visual_spec.lua
index 924ab8dbbe..151e5874e1 100644
--- a/test/functional/legacy/visual_spec.lua
+++ b/test/functional/legacy/visual_spec.lua
@@ -15,7 +15,7 @@ describe('Visual highlight', function()
screen:set_default_attr_ids({
[0] = { foreground = Screen.colors.Blue, bold = true }, -- NonText
[1] = { bold = true }, -- ModeMsg
- [2] = { background = Screen.colors.LightGrey }, -- Visual
+ [2] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
})
screen:attach()
end)
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua
index 417a19f92c..896f75a681 100644
--- a/test/functional/ui/bufhl_spec.lua
+++ b/test/functional/ui/bufhl_spec.lua
@@ -29,7 +29,7 @@ describe('Buffer highlighting', function()
[10] = { foreground = Screen.colors.Red },
[11] = { foreground = Screen.colors.Grey100, background = Screen.colors.Red },
[12] = { foreground = Screen.colors.Blue1 },
- [13] = { background = Screen.colors.LightGrey },
+ [13] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
[14] = { background = Screen.colors.Gray90 },
[15] = { background = Screen.colors.Gray90, bold = true, foreground = Screen.colors.Brown },
[16] = { foreground = Screen.colors.Magenta, background = Screen.colors.Gray90 },
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 9aee2ee103..0eb5770819 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -22,7 +22,7 @@ local function new_screen(opt)
[5] = { bold = true, foreground = Screen.colors.SeaGreen4 },
[6] = { foreground = Screen.colors.Magenta },
[7] = { bold = true, foreground = Screen.colors.Brown },
- [8] = { background = Screen.colors.LightGrey },
+ [8] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
[9] = { bold = true },
[10] = { background = Screen.colors.Yellow1 },
})
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index e877dd2283..930e4c3f10 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -806,14 +806,14 @@ describe('extmark decorations', function()
[23] = {foreground = Screen.colors.Magenta1, background = Screen.colors.LightGrey};
[24] = {bold = true};
[25] = {background = Screen.colors.LightRed};
- [26] = {background=Screen.colors.DarkGrey, foreground=Screen.colors.LightGrey};
- [27] = {background = Screen.colors.Plum1};
+ [26] = {background = Screen.colors.DarkGrey, foreground = Screen.colors.LightGrey};
+ [27] = {background = Screen.colors.LightGrey, foreground = Screen.colors.Black};
[28] = {underline = true, foreground = Screen.colors.SlateBlue};
- [29] = {foreground = Screen.colors.SlateBlue, background = Screen.colors.LightGray, underline = true};
- [30] = {foreground = Screen.colors.DarkCyan, background = Screen.colors.LightGray, underline = true};
+ [29] = {foreground = Screen.colors.SlateBlue, background = Screen.colors.LightGrey, underline = true};
+ [30] = {foreground = Screen.colors.DarkCyan, background = Screen.colors.LightGrey, underline = true};
[31] = {underline = true, foreground = Screen.colors.DarkCyan};
[32] = {underline = true};
- [33] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGray};
+ [33] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey};
[34] = {background = Screen.colors.Yellow};
[35] = {background = Screen.colors.Yellow, bold = true, foreground = Screen.colors.Blue};
[36] = {foreground = Screen.colors.Blue1, bold = true, background = Screen.colors.Red};
@@ -824,6 +824,7 @@ describe('extmark decorations', function()
[41] = {bold = true, reverse = true};
[42] = {undercurl = true, special = Screen.colors.Red};
[43] = {background = Screen.colors.Yellow, undercurl = true, special = Screen.colors.Red};
+ [44] = {background = Screen.colors.LightMagenta};
}
ns = api.nvim_create_namespace 'test'
@@ -1017,7 +1018,7 @@ describe('extmark decorations', function()
screen:expect{grid=[[
ababababababababababababababababababababab{4:01234567}|
{1:++}{4:89}abababababababababababababababababababa{4:0123456}|
- {1:++}^a{18:babab}ababababababababababababababababababababab|
+ {1:++}^a{27:babab}ababababababababababababababababababababab|
{1:++}abababababababababababababababababababababababab|
{1:++}ababab |
{24:-- VISUAL --} |
@@ -1027,7 +1028,7 @@ describe('extmark decorations', function()
screen:expect{grid=[[
ababababababababababababababababababababab{4:01234567}|
{1:++}{4:89}abababababababababababababababababababa{4:0123456}|
- {1:++}{18:ababa}^bababababababababababababababababababababab|
+ {1:++}{27:ababa}^bababababababababababababababababababababab|
{1:++}abababababababababababababababababababababababab|
{1:++}ababab |
{24:-- VISUAL --} |
@@ -1036,8 +1037,8 @@ describe('extmark decorations', function()
feed('gk')
screen:expect{grid=[[
ababababababababababababababababababababab{4:01234567}|
- {1:++}{4:89}aba^b{18:ababababababababababababababababababababab}|
- {1:++}{18:a}{4:89}babababababababababababababababababababababab|
+ {1:++}{4:89}aba^b{27:ababababababababababababababababababababab}|
+ {1:++}{27:a}{4:89}babababababababababababababababababababababab|
{1:++}abababababababababababababababababababababababab|
{1:++}ababab |
{24:-- VISUAL --} |
@@ -1046,7 +1047,7 @@ describe('extmark decorations', function()
feed('o')
screen:expect{grid=[[
ababababababababababababababababababababab{4:01234567}|
- {1:++}{4:89}aba{18:bababababababababababababababababababababab}|
+ {1:++}{4:89}aba{27:bababababababababababababababababababababab}|
{1:++}^a{4:89}babababababababababababababababababababababab|
{1:++}abababababababababababababababababababababababab|
{1:++}ababab |
@@ -1185,6 +1186,7 @@ describe('extmark decorations', function()
]]}
command 'hi Blendy guibg=Red blend=30'
+ command 'hi! Visual guifg=NONE guibg=LightGrey'
api.nvim_buf_set_extmark(0, ns, 1, 5, { virt_text={{'blendy text - here', 'Blendy'}}, virt_text_pos='overlay', hl_mode='blend'})
api.nvim_buf_set_extmark(0, ns, 2, 5, { virt_text={{'combining color', 'Blendy'}}, virt_text_pos='overlay', hl_mode='combine'})
api.nvim_buf_set_extmark(0, ns, 3, 5, { virt_text={{'replacing color', 'Blendy'}}, virt_text_pos='overlay', hl_mode='replace'})
@@ -1800,7 +1802,7 @@ describe('extmark decorations', function()
end
screen:expect{grid=[[
- {27: } |
+ {44: } |
XXX |*2
^XXX HELLO |
XXX |*7
@@ -1901,7 +1903,8 @@ describe('extmark decorations', function()
feed('gg')
command('set ft=lua')
command('syntax on')
- api.nvim_buf_set_extmark(0, ns, 0, 0, { end_col = 3, hl_mode = 'combine', hl_group = 'Visual' })
+ command('hi default MyMark guibg=LightGrey')
+ api.nvim_buf_set_extmark(0, ns, 0, 0, { end_col = 3, hl_mode = 'combine', hl_group = 'MyMark' })
command('hi default MyLine gui=underline')
command('sign define CurrentLine linehl=MyLine')
fn.sign_place(6, 'Test', 'CurrentLine', '', { lnum = 1 })
@@ -1964,18 +1967,19 @@ describe('extmark decorations', function()
it('highlight applies to a full TAB on line with matches #20885', function()
screen:try_resize(50, 3)
api.nvim_buf_set_lines(0, 0, -1, true, {'\t-- match1', ' -- match2'})
- fn.matchadd('Underlined', 'match')
- api.nvim_buf_set_extmark(0, ns, 0, 0, { end_row = 1, end_col = 0, hl_group = 'Visual' })
- api.nvim_buf_set_extmark(0, ns, 1, 0, { end_row = 2, end_col = 0, hl_group = 'Visual' })
+ fn.matchadd('NonText', 'match')
+ api.nvim_buf_set_extmark(0, ns, 0, 0, { end_row = 1, end_col = 0, hl_group = 'Search' })
+ api.nvim_buf_set_extmark(0, ns, 1, 0, { end_row = 2, end_col = 0, hl_group = 'Search' })
screen:expect{grid=[[
- {18: ^ -- }{29:match}{18:1} |
- {18: -- }{29:match}{18:2} |
+ {34: ^ -- }{35:match}{34:1} |
+ {34: -- }{35:match}{34:2} |
|
]]}
end)
pending('highlight applies to a full TAB in visual block mode', function()
screen:try_resize(50, 8)
+ command('hi! Visual guifg=NONE guibg=LightGrey')
api.nvim_buf_set_lines(0, 0, -1, true, {'asdf', '\tasdf', '\tasdf', '\tasdf', 'asdf'})
api.nvim_buf_set_extmark(0, ns, 0, 0, {end_row = 5, end_col = 0, hl_group = 'Underlined'})
screen:expect([[
@@ -2339,11 +2343,10 @@ describe('extmark decorations', function()
local url = 'https://example.com'
- local attrs = screen:get_default_attr_ids()
- table.insert(attrs, {
- url = url,
+ screen:set_default_attr_ids({
+ e = { bold = true, foreground = Screen.colors.Blue },
+ u = { url = url },
})
- screen:set_default_attr_ids(attrs)
api.nvim_buf_set_extmark(0, ns, 1, 4, {
end_col = 14,
@@ -2352,7 +2355,7 @@ describe('extmark decorations', function()
screen:expect{grid=[[
for _,item in ipairs(items) do |
- {44:local text}, hl_id_cell, count = unpack(item) |
+ {u:local text}, hl_id_cell, count = unpack(item) |
if hl_id_cell ~= nil then |
hl_id = hl_id_cell |
end |
@@ -2363,8 +2366,8 @@ describe('extmark decorations', function()
colpos = colpos+1 |
end |
en^d |
- {1:~ }|
- {1:~ }|
+ {e:~ }|
+ {e:~ }|
|
]]}
end)
@@ -2383,7 +2386,7 @@ describe('decorations: inline virtual text', function()
[4] = {background = Screen.colors.Red1, foreground = Screen.colors.Gray100};
[5] = {background = Screen.colors.Red1, bold = true};
[6] = {foreground = Screen.colors.DarkCyan};
- [7] = {background = Screen.colors.LightGrey};
+ [7] = {background = Screen.colors.LightGrey, foreground = Screen.colors.Black};
[8] = {bold = true};
[9] = {background = Screen.colors.Plum1};
[10] = {foreground = Screen.colors.SlateBlue};
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
index 60ba9f3958..4d06a24d3f 100644
--- a/test/functional/ui/float_spec.lua
+++ b/test/functional/ui/float_spec.lua
@@ -869,8 +869,8 @@ describe('float window', function()
[24] = {foreground = Screen.colors.Black, background = Screen.colors.Grey80};
[25] = {blend = 100, background = Screen.colors.Gray0};
[26] = {blend = 80, background = Screen.colors.Gray0};
- [27] = {background = Screen.colors.LightGray};
- [28] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGray};
+ [27] = {foreground = Screen.colors.Black, background = Screen.colors.LightGrey};
+ [28] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey};
}
screen:set_default_attr_ids(attrs)
end)
@@ -7448,8 +7448,8 @@ describe('float window', function()
[10] = {foreground = Screen.colors.Red, background = Screen.colors.LightMagenta, blend = 0},
[11] = {foreground = Screen.colors.Red, background = Screen.colors.LightMagenta, blend = 80},
[12] = {background = Screen.colors.LightMagenta, bold = true, foreground = Screen.colors.Blue1, blend = 30},
- [13] = {background = Screen.colors.LightGray, blend = 30},
- [14] = {foreground = Screen.colors.Grey0, background = Screen.colors.Grey88},
+ [13] = {foreground = Screen.colors.Black, background = Screen.colors.LightGray, blend = 30},
+ [14] = {foreground = Screen.colors.Black, background = Screen.colors.Grey88},
[15] = {foreground = tonumber('0x939393'), background = Screen.colors.Grey88},
[16] = {background = Screen.colors.Grey90};
[17] = {blend = 100};
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 01f08cd6f7..7f13b6bd03 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -44,7 +44,7 @@ describe('folded lines', function()
[13] = { foreground = Screen.colors.Red, background = Screen.colors.LightGrey },
[14] = { background = Screen.colors.Red },
[15] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.Red },
- [16] = { background = Screen.colors.LightGrey },
+ [16] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
[17] = { background = Screen.colors.Yellow, foreground = Screen.colors.Red },
[18] = {
background = Screen.colors.LightGrey,
@@ -2254,7 +2254,7 @@ describe('folded lines', function()
end)
it('Folded and Visual highlights are combined #19691', function()
- command('hi! Visual guibg=Red')
+ command('hi! Visual guifg=NONE guibg=Red')
insert([[
" foofoofoofoofoofoo
" 口 {{{1
@@ -2563,7 +2563,7 @@ describe('folded lines', function()
eq('▶--\tsentence composed by', fn.foldtextresult(3))
eq('▶--\tin his cave.', fn.foldtextresult(5))
- command('hi! Visual guibg=Red')
+ command('hi! Visual guifg=NONE guibg=Red')
feed('V2k')
if multigrid then
screen:expect([[
@@ -2677,7 +2677,7 @@ describe('folded lines', function()
]])
end
- command('hi! Visual guibg=Red')
+ command('hi! Visual guifg=NONE guibg=Red')
feed('V2k')
if multigrid then
screen:expect([[
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index d2320db2a1..5c0804a5d4 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -317,8 +317,8 @@ describe('highlight', function()
local screen = Screen.new(45, 5)
screen:attach()
screen:set_default_attr_ids({
- [1] = { background = Screen.colors.LightGrey },
- [2] = { bold = true, foreground = Screen.colors.Blue1 },
+ [1] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
+ [2] = { bold = true, foreground = Screen.colors.Blue },
[3] = { bold = true },
[4] = { reverse = true, bold = true },
[5] = { reverse = true },
@@ -833,41 +833,20 @@ describe("'listchars' highlight", function()
it("'listchar' in visual mode", function()
screen:set_default_attr_ids({
[1] = { background = Screen.colors.Grey90 },
- [2] = {
- foreground = Screen.colors.Red,
- background = Screen.colors.Grey90,
- },
- [3] = {
- background = Screen.colors.Grey90,
- foreground = Screen.colors.Blue,
- bold = true,
- },
- [4] = {
- foreground = Screen.colors.Blue,
- bold = true,
- },
- [5] = {
- foreground = Screen.colors.Red,
- },
- [6] = {
- background = Screen.colors.LightGrey,
- },
- [7] = {
- background = Screen.colors.LightGrey,
- foreground = Screen.colors.Red,
- },
- [8] = {
- background = Screen.colors.LightGrey,
- foreground = Screen.colors.Blue,
- bold = true,
- },
+ [2] = { foreground = Screen.colors.Red, background = Screen.colors.Grey90 },
+ [3] = { background = Screen.colors.Grey90, foreground = Screen.colors.Blue, bold = true },
+ [4] = { foreground = Screen.colors.Blue, bold = true },
+ [5] = { foreground = Screen.colors.Red },
+ [6] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black },
+ [7] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Red },
+ [8] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Blue, bold = true },
})
- feed_command('highlight clear ModeMsg')
- feed_command('highlight Whitespace guifg=#FF0000')
- feed_command('set cursorline')
- feed_command('set tabstop=8')
- feed_command('set nowrap')
- feed_command('set listchars=space:.,eol:¬,tab:>-,extends:>,precedes:<,trail:* list')
+ command('highlight clear ModeMsg')
+ command('highlight Whitespace guifg=#FF0000')
+ command('set cursorline')
+ command('set tabstop=8')
+ command('set nowrap')
+ command('set listchars=space:.,eol:¬,tab:>-,extends:>,precedes:<,trail:* list')
feed('i\t abcd <cr>\t abcd Lorem ipsum dolor sit amet<cr><esc>kkk0')
screen:expect([[
{2:^>-------.}{1:abcd}{2:*}{3:¬}{1: }|
@@ -1200,7 +1179,7 @@ describe('CursorLine and CursorLineNr highlights', function()
[6] = { bold = true, foreground = Screen.colors.Blue1 },
[7] = { background = Screen.colors.LightRed },
[8] = { foreground = Screen.colors.Brown },
- [9] = { background = Screen.colors.LightGrey },
+ [9] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
[10] = { bold = true },
})
screen:attach()
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua
index 7f551c5ee5..0f30bf4471 100644
--- a/test/functional/ui/mouse_spec.lua
+++ b/test/functional/ui/mouse_spec.lua
@@ -22,7 +22,7 @@ describe('ui/mouse/input', function()
screen:attach()
screen:set_default_attr_ids({
[0] = { bold = true, foreground = Screen.colors.Blue },
- [1] = { background = Screen.colors.LightGrey },
+ [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black },
[2] = { bold = true },
[3] = {
foreground = Screen.colors.Blue,
@@ -561,7 +561,7 @@ describe('ui/mouse/input', function()
tab = { background = Screen.colors.LightGrey, underline = true },
sel = { bold = true },
fill = { reverse = true },
- vis = { background = Screen.colors.LightGrey },
+ vis = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black },
})
feed_command('silent file foo | tabnew | file bar')
insert('this is bar')
diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua
index 673e729a39..c1d3af085f 100644
--- a/test/functional/ui/multigrid_spec.lua
+++ b/test/functional/ui/multigrid_spec.lua
@@ -36,7 +36,7 @@ describe('ext_multigrid', function()
[17] = {background = Screen.colors.LightGrey, underline = true, bold = true, foreground = Screen.colors.Magenta},
[18] = {bold = true, foreground = Screen.colors.Magenta},
[19] = {foreground = Screen.colors.Brown},
- [20] = {background = Screen.colors.LightGrey},
+ [20] = {background = Screen.colors.LightGrey, foreground = Screen.colors.Black},
[21] = {background = Screen.colors.LightMagenta},
[22] = {background = Screen.colors.LightMagenta, bold = true, foreground = Screen.colors.Blue},
[23] = {background = Screen.colors.Grey90},
diff --git a/test/functional/ui/syntax_conceal_spec.lua b/test/functional/ui/syntax_conceal_spec.lua
index 087fdf4f14..5afc7dfe6c 100644
--- a/test/functional/ui/syntax_conceal_spec.lua
+++ b/test/functional/ui/syntax_conceal_spec.lua
@@ -20,7 +20,7 @@ describe('Screen', function()
[3] = { reverse = true },
[4] = { bold = true },
[5] = { background = Screen.colors.Yellow },
- [6] = { background = Screen.colors.LightGrey },
+ [6] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
})
end)
diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua
index 69789ce8c1..c2a52c0f21 100644
--- a/test/functional/ui/winbar_spec.lua
+++ b/test/functional/ui/winbar_spec.lua
@@ -24,7 +24,7 @@ describe('winbar', function()
[4] = { bold = true, reverse = true },
[5] = { bold = true, foreground = Screen.colors.Red },
[6] = { foreground = Screen.colors.Blue },
- [7] = { background = Screen.colors.LightGrey },
+ [7] = { foreground = Screen.colors.Black, background = Screen.colors.LightGrey },
[8] = { background = Screen.colors.LightMagenta },
[9] = {
bold = true,