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/syntax.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/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 13bc2f0d50..03f20047a5 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -3346,7 +3346,7 @@ static void syn_list_one(const int id, const bool syncing, const bool link_only) KEYVALUE_ENTRY(HL_SKIPEMPTY, "skipempty"), }; - const int hl_id = HLF_D + 1; // highlight like directories + const int hl_id = HLF_D; // highlight like directories // list the keywords for "id" if (!syncing) { @@ -3451,9 +3451,9 @@ static void syn_list_cluster(int id) msg_advance(endcol); if (SYN_CLSTR(curwin->w_s)[id].scl_list != NULL) { - put_id_list("cluster", SYN_CLSTR(curwin->w_s)[id].scl_list, HLF_D + 1); + put_id_list("cluster", SYN_CLSTR(curwin->w_s)[id].scl_list, HLF_D); } else { - msg_puts_hl("cluster", HLF_D + 1, false); + msg_puts_hl("cluster", HLF_D, false); msg_puts("=NONE"); } } |