diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-11-11 13:06:37 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-11-13 11:20:10 +0100 |
commit | ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0 (patch) | |
tree | 366be69fff5a72c1f73b27ffa8cdf1a900288dbf /src/nvim/ex_getln.c | |
parent | eaf5ae6cc69a97e58365b409554783be9dd21385 (diff) | |
download | rneovim-ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0.tar.gz rneovim-ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0.tar.bz2 rneovim-ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0.zip |
refactor(highlight): make enum of builtin highlights start with 1
This makes it possible to use HLF_ values directly as highlight id:s
and avoids +1 adjustments especially around messages.
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index dd107cd3bf..ace62ea729 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -811,7 +811,7 @@ static uint8_t *command_line_enter(int firstc, int count, int indent, bool clear if (!tl_ret && ERROR_SET(&err)) { msg_putchar('\n'); msg_scroll = true; - msg_puts_hl(err.msg, HLF_E + 1, true); + msg_puts_hl(err.msg, HLF_E, true); api_clear_error(&err); redrawcmd(); } @@ -2660,7 +2660,7 @@ static void do_autocmd_cmdlinechanged(int firstc) if (!tl_ret && ERROR_SET(&err)) { msg_putchar('\n'); msg_scroll = true; - msg_puts_hl(err.msg, HLF_E + 1, true); + msg_puts_hl(err.msg, HLF_E, true); api_clear_error(&err); redrawcmd(); } @@ -3141,7 +3141,7 @@ static bool color_cmdline(CmdlineInfo *colored_ccline) #define PRINT_ERRMSG(...) \ do { \ msg_putchar('\n'); \ - msg_printf_hl(HLF_E + 1, __VA_ARGS__); \ + msg_printf_hl(HLF_E, __VA_ARGS__); \ printed_errmsg = true; \ } while (0) bool ret = true; |