From 5cfa7a72f8c40cdcc0fa93693689915e913806f1 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 20 Feb 2024 17:25:57 +0100 Subject: 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. --- src/nvim/os/shell.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/os/shell.c') diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index efcdee9c8b..81b75dc4d3 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -885,9 +885,9 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu // Failed, probably 'shell' is not executable. if (!silent) { msg_puts(_("\nshell failed to start: ")); - msg_outtrans(os_strerror(status), 0); + msg_outtrans(os_strerror(status), 0, false); msg_puts(": "); - msg_outtrans(prog, 0); + msg_outtrans(prog, 0, false); msg_putchar('\n'); } multiqueue_free(events); @@ -1102,7 +1102,7 @@ static void out_data_append_to_screen(const char *output, size_t *count, bool eo const char *end = output + *count; while (p < end) { if (*p == '\n' || *p == '\r' || *p == TAB || *p == BELL) { - msg_putchar_attr((uint8_t)(*p), 0); + msg_putchar_hl((uint8_t)(*p), 0); p++; } else { // Note: this is not 100% precise: @@ -1118,7 +1118,7 @@ static void out_data_append_to_screen(const char *output, size_t *count, bool eo goto end; } - msg_outtrans_len(p, i, 0); + msg_outtrans_len(p, i, 0, false); p += i; } } -- cgit