mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 09:14:24 +00:00
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
34e4a05d02
Co-authored-by: Maxim Kim <habamax@gmail.com>
This commit is contained in:
@@ -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' })
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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([[
|
||||
|
||||
@@ -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([[
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 },
|
||||
})
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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([[
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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},
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user