refactor(message): propagate highlight id instead of attrs

Problem:  Highlight group id is not propagated to the end of the message call
          stack, where ext_messages are emitted.
Solution: Refactor message functions to pass along highlight group id
          instead of attr id.
This commit is contained in:
Luuk van Baal
2024-02-20 17:25:57 +01:00
parent 5a86360400
commit 5cfa7a72f8
45 changed files with 441 additions and 473 deletions

View File

@@ -5501,7 +5501,7 @@ static void ex_tabs(exarg_T *eap)
msg_putchar('\n');
vim_snprintf(IObuff, IOSIZE, _("Tab page %d"), tabcount++);
msg_outtrans(IObuff, HL_ATTR(HLF_T));
msg_outtrans(IObuff, HLF_T + 1, false);
os_breakcheck();
FOR_ALL_WINDOWS_IN_TAB(wp, tp) {
@@ -5519,7 +5519,7 @@ static void ex_tabs(exarg_T *eap)
} else {
home_replace(wp->w_buffer, wp->w_buffer->b_fname, IObuff, IOSIZE, true);
}
msg_outtrans(IObuff, 0);
msg_outtrans(IObuff, 0, false);
os_breakcheck();
}
}
@@ -7776,7 +7776,7 @@ void verify_command(char *cmd)
if (strcmp("smile", cmd) != 0) {
return; // acceptable non-existing command
}
int a = HL_ATTR(HLF_E);
int a = HLF_E + 1;
msg(" #xxn` #xnxx` ,+x@##@Mz;` .xxx"
"xxxxxxnz+, znnnnnnnnnnnnnnnn.", a);
msg(" n###z x####` :x##########W+` ,###"