diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-02-20 17:25:57 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-11-08 13:21:35 +0100 |
commit | 5cfa7a72f8c40cdcc0fa93693689915e913806f1 (patch) | |
tree | 2c482565d5667dc0ec9caca6e893da7d5a37359a /src/nvim/os/shell.c | |
parent | 5a86360400691e55fae66d60485b61360a1d3d6c (diff) | |
download | rneovim-5cfa7a72f8c40cdcc0fa93693689915e913806f1.tar.gz rneovim-5cfa7a72f8c40cdcc0fa93693689915e913806f1.tar.bz2 rneovim-5cfa7a72f8c40cdcc0fa93693689915e913806f1.zip |
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.
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r-- | src/nvim/os/shell.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } |