From ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 11 Nov 2024 13:06:37 +0100 Subject: 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. --- src/nvim/change.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/change.c') diff --git a/src/nvim/change.c b/src/nvim/change.c index 3d78b17f2a..f3a8e0b208 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -89,9 +89,9 @@ void change_warning(buf_T *buf, int col) if (msg_row == Rows - 1) { msg_col = col; } - msg_source(HLF_W + 1); + msg_source(HLF_W); msg_ext_set_kind("wmsg"); - msg_puts_hl(_(w_readonly), HLF_W + 1, true); + msg_puts_hl(_(w_readonly), HLF_W, true); set_vim_var_string(VV_WARNINGMSG, _(w_readonly), -1); msg_clr_eos(); msg_end(); -- cgit