A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/96bb1784a61daec4535edf291303225aa1fa01e0 below:

highlight attribute for underline · neovim/neovim@96bb178 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+12

-5

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+12

-5

lines changed Original file line number Diff line number Diff line change

@@ -11411,7 +11411,7 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv, FunPtr fptr)

11411 11411

case 'u': {

11412 11412

const size_t len = STRLEN(what);

11413 11413

if (len <= 5 || (TOLOWER_ASC(what[5]) == 'l' && len <= 9)) { // underline

11414 -

p = highlight_has_attr(id, HL_UNDERCURL, modec);

11414 +

p = highlight_has_attr(id, HL_UNDERLINE, modec);

11415 11415

} else if (TOLOWER_ASC(what[5]) == 'c') { // undercurl

11416 11416

p = highlight_has_attr(id, HL_UNDERCURL, modec);

11417 11417

} else if (len > 9 && TOLOWER_ASC(what[9]) == 'l') { // underlineline

Original file line number Diff line number Diff line change

@@ -305,10 +305,17 @@ describe('synIDattr()', function()

305 305

eq('79', eval('synIDattr(hlID("Keyword"), "fg")'))

306 306

end)

307 307 308 -

it('returns "1" if group has "strikethrough" attribute', function()

309 -

eq('', eval('synIDattr(hlID("Normal"), "strikethrough")'))

310 -

eq('1', eval('synIDattr(hlID("Keyword"), "strikethrough")'))

311 -

eq('1', eval('synIDattr(hlID("Keyword"), "strikethrough", "gui")'))

308 +

it('returns "1" if group has given highlight attribute', function()

309 +

local hl_attrs = {

310 +

'underline', 'underlineline', 'undercurl', 'underdot', 'underdash', 'strikethrough'

311 +

}

312 +

for _,hl_attr in ipairs(hl_attrs) do

313 +

local context = 'using ' .. hl_attr .. ' attr'

314 +

command('highlight Keyword cterm=' .. hl_attr .. ' gui=' .. hl_attr)

315 +

eq('', eval('synIDattr(hlID("Normal"), "'.. hl_attr .. '")'), context)

316 +

eq('1', eval('synIDattr(hlID("Keyword"), "' .. hl_attr .. '")'), context)

317 +

eq('1', eval('synIDattr(hlID("Keyword"), "' .. hl_attr .. '", "gui")'), context)

318 +

end

312 319

end)

313 320

end)

314 321

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4