mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 10:31:48 +00:00
refactor(highlight)!: rename attributes to match Vim (#19159)
Ref: 84f5463630
Rename:
- `underlineline` to `underdouble`
- `underdot` to `underdotted`
- `underdash` to `underdashed`
`underdouble` also now takes higher precedence than `undercurl`.
This commit is contained in:
@@ -29,10 +29,10 @@ describe('API: highlight',function()
|
||||
italic = true,
|
||||
reverse = true,
|
||||
underline = true,
|
||||
underlineline = true,
|
||||
undercurl = true,
|
||||
underdot = true,
|
||||
underdash = true,
|
||||
underdouble = true,
|
||||
underdotted = true,
|
||||
underdashed = true,
|
||||
strikethrough = true,
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('API: highlight',function()
|
||||
eq('Invalid highlight id: 30000', string.match(emsg, 'Invalid.*'))
|
||||
|
||||
-- Test all highlight properties.
|
||||
command('hi NewHighlight gui=underline,bold,underlineline,undercurl,underdot,underdash,italic,reverse,strikethrough')
|
||||
command('hi NewHighlight gui=underline,bold,undercurl,underdouble,underdotted,underdashed,italic,reverse,strikethrough')
|
||||
eq(expected_rgb2, nvim("get_hl_by_id", hl_id, true))
|
||||
|
||||
-- Test nil argument.
|
||||
@@ -205,9 +205,9 @@ describe("API: set highlight", function()
|
||||
reverse = true,
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
underdash = true,
|
||||
underdot = true,
|
||||
underlineline = true,
|
||||
underdashed = true,
|
||||
underdotted = true,
|
||||
underdouble = true,
|
||||
strikethrough = true,
|
||||
cterm = {
|
||||
italic = true,
|
||||
@@ -224,9 +224,9 @@ describe("API: set highlight", function()
|
||||
reverse = true,
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
underdash = true,
|
||||
underdot = true,
|
||||
underlineline = true,
|
||||
underdashed = true,
|
||||
underdotted = true,
|
||||
underdouble = true,
|
||||
strikethrough = true,
|
||||
}
|
||||
local highlight3_result_cterm = {
|
||||
@@ -290,7 +290,7 @@ describe("API: set highlight", function()
|
||||
exec_capture('highlight Test_hl'))
|
||||
|
||||
meths.set_hl(0, 'Test_hl2', highlight3_config)
|
||||
eq('Test_hl2 xxx cterm=undercurl,italic,reverse,strikethrough ctermfg=8 ctermbg=15 gui=bold,underline,underlineline,undercurl,underdot,underdash,italic,reverse,strikethrough guifg=#ff0000 guibg=#0032aa',
|
||||
eq('Test_hl2 xxx cterm=undercurl,italic,reverse,strikethrough ctermfg=8 ctermbg=15 gui=bold,underline,undercurl,underdouble,underdotted,underdashed,italic,reverse,strikethrough guifg=#ff0000 guibg=#0032aa',
|
||||
exec_capture('highlight Test_hl2'))
|
||||
|
||||
-- Colors are stored with the name they are defined, but
|
||||
|
||||
@@ -306,7 +306,7 @@ describe('synIDattr()', function()
|
||||
|
||||
it('returns "1" if group has given highlight attribute', function()
|
||||
local hl_attrs = {
|
||||
'underline', 'underlineline', 'undercurl', 'underdot', 'underdash', 'strikethrough'
|
||||
'underline', 'undercurl', 'underdouble', 'underdotted', 'underdashed', 'strikethrough'
|
||||
}
|
||||
for _,hl_attr in ipairs(hl_attrs) do
|
||||
local context = 'using ' .. hl_attr .. ' attr'
|
||||
|
||||
@@ -1579,9 +1579,9 @@ end
|
||||
|
||||
function Screen:_equal_attrs(a, b)
|
||||
return a.bold == b.bold and a.standout == b.standout and
|
||||
a.underline == b.underline and a.underlineline == b.underlineline and
|
||||
a.undercurl == b.undercurl and a.underdot == b.underdot and
|
||||
a.underdash == b.underdash and a.italic == b.italic and
|
||||
a.underline == b.underline and a.undercurl == b.undercurl and
|
||||
a.underdouble == b.underdouble and a.underdotted == b.underdotted and
|
||||
a.underdashed == b.underdashed and a.italic == b.italic and
|
||||
a.reverse == b.reverse and a.foreground == b.foreground and
|
||||
a.background == b.background and a.special == b.special and a.blend == b.blend and
|
||||
a.strikethrough == b.strikethrough and
|
||||
|
||||
Reference in New Issue
Block a user