vim-patch:8.0.0513: fix getting name of cleared highlight group (#8103)

Problem:    Getting name of cleared highlight group is wrong. (Matt Wozniski)
Solution:   Only skip over cleared names for completion. (closes vim/vim#1592)
            Also fix that a cleared group causes duplicate completions.
c96272e30e
This commit is contained in:
KunMing Xie
2018-03-09 02:49:21 +08:00
committed by Justin M. Keyes
parent 1d5eec2c62
commit 5ec0a6d13f
5 changed files with 28 additions and 9 deletions

View File

@@ -5828,7 +5828,8 @@ static void sign_list_defined(sign_T *sp)
}
if (sp->sn_line_hl > 0) {
msg_puts(" linehl=");
const char *const p = get_highlight_name(NULL, sp->sn_line_hl - 1);
const char *const p = get_highlight_name_ext(NULL,
sp->sn_line_hl - 1, false);
if (p == NULL) {
msg_puts("NONE");
} else {
@@ -5837,7 +5838,8 @@ static void sign_list_defined(sign_T *sp)
}
if (sp->sn_text_hl > 0) {
msg_puts(" texthl=");
const char *const p = get_highlight_name(NULL, sp->sn_text_hl - 1);
const char *const p = get_highlight_name_ext(NULL,
sp->sn_text_hl - 1, false);
if (p == NULL) {
msg_puts("NONE");
} else {