aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/insexpand.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-11-11 13:06:37 +0100
committerbfredl <bjorn.linse@gmail.com>2024-11-13 11:20:10 +0100
commitff7518b83cb270f8fcaded19bf640cf4bdfb0ff0 (patch)
tree366be69fff5a72c1f73b27ffa8cdf1a900288dbf /src/nvim/insexpand.c
parenteaf5ae6cc69a97e58365b409554783be9dd21385 (diff)
downloadrneovim-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/insexpand.c')
-rw-r--r--src/nvim/insexpand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c
index 9efcc2263a..bd7ee55722 100644
--- a/src/nvim/insexpand.c
+++ b/src/nvim/insexpand.c
@@ -473,7 +473,7 @@ bool check_compl_option(bool dict_opt)
ctrl_x_mode = CTRL_X_NORMAL;
edit_submode = NULL;
msg((dict_opt ? _("'dictionary' option is empty") : _("'thesaurus' option is empty")),
- HLF_E + 1);
+ HLF_E);
if (emsg_silent == 0 && !in_assert_fails) {
vim_beep(BO_COMPL);
setcursor();
@@ -1564,7 +1564,7 @@ static void ins_compl_files(int count, char **files, bool thesaurus, int flags,
msg_hist_off = true; // reset in msg_trunc()
vim_snprintf(IObuff, IOSIZE,
_("Scanning dictionary: %s"), files[i]);
- msg_trunc(IObuff, true, HLF_R + 1);
+ msg_trunc(IObuff, true, HLF_R);
}
if (fp == NULL) {
@@ -3046,7 +3046,7 @@ static int process_next_cpt_value(ins_compl_next_state_T *st, int *compl_type_ar
: st->ins_buf->b_sfname == NULL
? st->ins_buf->b_fname
: st->ins_buf->b_sfname);
- msg_trunc(IObuff, true, HLF_R + 1);
+ msg_trunc(IObuff, true, HLF_R);
}
} else if (*st->e_cpt == NUL) {
status = INS_COMPL_CPT_END;
@@ -3074,7 +3074,7 @@ static int process_next_cpt_value(ins_compl_next_state_T *st, int *compl_type_ar
if (!shortmess(SHM_COMPLETIONSCAN)) {
msg_hist_off = true; // reset in msg_trunc()
vim_snprintf(IObuff, IOSIZE, "%s", _("Scanning tags."));
- msg_trunc(IObuff, true, HLF_R + 1);
+ msg_trunc(IObuff, true, HLF_R);
}
}