aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.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/cmdexpand.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/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index b64e4f3ab6..700d554821 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -986,12 +986,12 @@ static void showmatches_oneline(expand_T *xp, char **matches, int numMatches, in
int lastlen = 999;
for (int j = linenr; j < numMatches; j += lines) {
if (xp->xp_context == EXPAND_TAGS_LISTFILES) {
- msg_outtrans(matches[j], HLF_D + 1, false);
+ msg_outtrans(matches[j], HLF_D, false);
p = matches[j] + strlen(matches[j]) + 1;
msg_advance(maxlen + 1);
msg_puts(p);
msg_advance(maxlen + 3);
- msg_outtrans_long(p + 2, HLF_D + 1);
+ msg_outtrans_long(p + 2, HLF_D);
break;
}
for (int i = maxlen - lastlen; --i >= 0;) {
@@ -1028,7 +1028,7 @@ static void showmatches_oneline(expand_T *xp, char **matches, int numMatches, in
isdir = false;
p = SHOW_MATCH(j);
}
- lastlen = msg_outtrans(p, isdir ? HLF_D + 1 : 0, false);
+ lastlen = msg_outtrans(p, isdir ? HLF_D : 0, false);
}
if (msg_col > 0) { // when not wrapped around
msg_clr_eos();
@@ -1119,10 +1119,10 @@ int showmatches(expand_T *xp, bool wildmenu)
}
if (xp->xp_context == EXPAND_TAGS_LISTFILES) {
- msg_puts_hl(_("tagname"), HLF_T + 1, false);
+ msg_puts_hl(_("tagname"), HLF_T, false);
msg_clr_eos();
msg_advance(maxlen - 3);
- msg_puts_hl(_(" kind file\n"), HLF_T + 1, false);
+ msg_puts_hl(_(" kind file\n"), HLF_T, false);
}
// list the files line by line