[nvim] properly display wavy underlines under spelling mistakes now that I have enabled all termcap features of kitty

This commit is contained in:
Dmytro Meleshko 2021-02-08 21:51:59 +02:00 committed by pull[bot]
parent b15a03c3f9
commit 851a494eb0
2 changed files with 11 additions and 6 deletions

View file

@ -137,10 +137,15 @@
hi! link ctrlsfMatch Search hi! link ctrlsfMatch Search
hi! link ctrlsfLnumMatch ctrlsfMatch hi! link ctrlsfLnumMatch ctrlsfMatch
call s:hi('SpellBad', 'bg', '', 'undercurl', 0x8) let s:is_kitty = $TERM ==# 'xterm-kitty'
call s:hi('SpellLocal', 'bg', '', 'undercurl', 0xC) let s:spell_fg = s:is_kitty ? '' : 'bg'
call s:hi('SpellCap', 'bg', '', 'undercurl', 0xD) let s:spell_bg = s:is_kitty ? 'NONE' : ''
call s:hi('SpellRare', 'bg', '', 'undercurl', 0xE) let s:spell_attr = s:is_kitty ? 'undercurl' : ''
call s:hi('SpellBad', s:spell_fg, s:spell_bg, s:spell_attr, 0x8)
call s:hi('SpellLocal', s:spell_fg, s:spell_bg, s:spell_attr, 0xC)
call s:hi('SpellCap', s:spell_fg, s:spell_bg, s:spell_attr, 0xD)
call s:hi('SpellRare', s:spell_fg, s:spell_bg, s:spell_attr, 0xE)
unlet s:is_kitty s:spell_fg s:spell_bg s:spell_attr
call s:hi('Sneak', 'bg', 0xB, 'bold', '') call s:hi('Sneak', 'bg', 0xB, 'bold', '')
hi! link SneakScope Visual hi! link SneakScope Visual

View file

@ -44,9 +44,9 @@ endif
let l:cmd = a:cmd let l:cmd = a:cmd
if &modified if &modified
let l:answer = confirm("Save changes?", "&Yes\n&No\n&Cancel") let l:answer = confirm("Save changes?", "&Yes\n&No\n&Cancel")
if l:answer is# 1 " Yes if l:answer ==# 1 " Yes
write write
elseif l:answer is# 2 " No elseif l:answer ==# 2 " No
let l:cmd .= '!' let l:cmd .= '!'
else " Cancel/Other else " Cancel/Other
return return