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

@@ -808,7 +808,7 @@ static void show_menus_recursive(vimmenu_T *menu, int modes, int depth)
msg_puts(" ");
}
// Same highlighting as for directories!?
msg_outtrans(menu->name, HL_ATTR(HLF_D));
msg_outtrans(menu->name, HLF_D + 1, false);
}
if (menu != NULL && menu->children == NULL) {
@@ -841,7 +841,7 @@ static void show_menus_recursive(vimmenu_T *menu, int modes, int depth)
}
msg_puts(" ");
if (*menu->strings[bit] == NUL) {
msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
msg_puts_hl("<Nop>", HLF_8 + 1, false);
} else {
msg_outtrans_special(menu->strings[bit], false, 0);
}