forked from aniani/vim
patch 8.2.1693: "hi def" does not work for cleared highlight
Problem: "hi def" does not work for cleared highlight. Solution: Check the "sg_cleared" flag. (Maxim Kim, closes #6956, closes #4405)
This commit is contained in:
@@ -729,7 +729,8 @@ do_highlight(
|
||||
|
||||
if (!ends_excmd2(line, skipwhite(to_end)))
|
||||
{
|
||||
semsg(_("E413: Too many arguments: \":highlight link %s\""), from_start);
|
||||
semsg(_("E413: Too many arguments: \":highlight link %s\""),
|
||||
from_start);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1629,7 +1630,8 @@ restore_cterm_colors(void)
|
||||
static int
|
||||
hl_has_settings(int idx, int check_link)
|
||||
{
|
||||
return ( HL_TABLE()[idx].sg_term_attr != 0
|
||||
return HL_TABLE()[idx].sg_cleared == 0
|
||||
&& ( HL_TABLE()[idx].sg_term_attr != 0
|
||||
|| HL_TABLE()[idx].sg_cterm_attr != 0
|
||||
|| HL_TABLE()[idx].sg_cterm_fg != 0
|
||||
|| HL_TABLE()[idx].sg_cterm_bg != 0
|
||||
|
Reference in New Issue
Block a user