mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
feat(highlight): define the concept of altfont as a (c)term rendering attribute
This commit is contained in:
@@ -33,6 +33,7 @@ describe('API: highlight',function()
|
||||
reverse = true,
|
||||
underline = true,
|
||||
strikethrough = true,
|
||||
altfont = true,
|
||||
nocombine = true,
|
||||
}
|
||||
local expected_undercurl = {
|
||||
@@ -61,7 +62,7 @@ describe('API: highlight',function()
|
||||
eq('Invalid highlight id: 30000', string.match(emsg, 'Invalid.*'))
|
||||
|
||||
-- Test all highlight properties.
|
||||
command('hi NewHighlight gui=underline,bold,italic,reverse,strikethrough,nocombine')
|
||||
command('hi NewHighlight gui=underline,bold,italic,reverse,strikethrough,altfont,nocombine')
|
||||
eq(expected_rgb2, nvim("get_hl_by_id", hl_id, true))
|
||||
|
||||
-- Test undercurl
|
||||
@@ -215,10 +216,12 @@ describe("API: set highlight", function()
|
||||
reverse = true,
|
||||
underline = true,
|
||||
strikethrough = true,
|
||||
altfont = true,
|
||||
cterm = {
|
||||
italic = true,
|
||||
reverse = true,
|
||||
strikethrough = true,
|
||||
altfont = true,
|
||||
nocombine = true,
|
||||
}
|
||||
}
|
||||
@@ -230,6 +233,7 @@ describe("API: set highlight", function()
|
||||
reverse = true,
|
||||
underline = true,
|
||||
strikethrough = true,
|
||||
altfont = true,
|
||||
}
|
||||
local highlight3_result_cterm = {
|
||||
background = highlight_color.ctermbg,
|
||||
@@ -237,6 +241,7 @@ describe("API: set highlight", function()
|
||||
italic = true,
|
||||
reverse = true,
|
||||
strikethrough = true,
|
||||
altfont = true,
|
||||
nocombine = true,
|
||||
}
|
||||
|
||||
@@ -292,7 +297,7 @@ describe("API: set highlight", function()
|
||||
exec_capture('highlight Test_hl'))
|
||||
|
||||
meths.set_hl(0, 'Test_hl2', highlight3_config)
|
||||
eq('Test_hl2 xxx cterm=italic,reverse,strikethrough,nocombine ctermfg=8 ctermbg=15 gui=bold,underline,italic,reverse,strikethrough guifg=#ff0000 guibg=#0032aa',
|
||||
eq('Test_hl2 xxx cterm=italic,reverse,strikethrough,altfont,nocombine ctermfg=8 ctermbg=15 gui=bold,underline,italic,reverse,strikethrough,altfont guifg=#ff0000 guibg=#0032aa',
|
||||
exec_capture('highlight Test_hl2'))
|
||||
|
||||
-- Colors are stored with the name they are defined, but
|
||||
|
||||
Reference in New Issue
Block a user