mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 12:38:33 +00:00
vim-patch:7.4.1547 #5326
Problem: Getting a cterm highlight attribute that is not set results in the
string "-1".
Solution: Return an empty string. (Taro Muraoka)
385111bd86
This commit is contained in:

committed by
Justin M. Keyes

parent
6e9f329d05
commit
bc1a5db6cc
@@ -7001,11 +7001,15 @@ highlight_color (
|
||||
if (font || sp)
|
||||
return NULL;
|
||||
if (modec == 'c') {
|
||||
if (fg)
|
||||
if (fg) {
|
||||
n = HL_TABLE()[id - 1].sg_cterm_fg - 1;
|
||||
else
|
||||
} else {
|
||||
n = HL_TABLE()[id - 1].sg_cterm_bg - 1;
|
||||
sprintf((char *)name, "%d", n);
|
||||
}
|
||||
if (n < 0) {
|
||||
return NULL;
|
||||
}
|
||||
snprintf((char *)name, sizeof(name), "%d", n);
|
||||
return name;
|
||||
}
|
||||
/* term doesn't have color */
|
||||
|
Reference in New Issue
Block a user