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.
This commit is contained in:
bfredl
2024-11-11 13:06:37 +01:00
parent eaf5ae6cc6
commit ff7518b83c
35 changed files with 113 additions and 112 deletions

View File

@@ -58,7 +58,8 @@ typedef struct {
/// Values for index in highlight_attr[].
/// When making changes, also update hlf_names in highlight.h!
typedef enum {
HLF_8 = 0, ///< Meta & special keys listed with ":map", text that is
HLF_NONE = 0, ///< no UI highlight active
HLF_8, ///< Meta & special keys listed with ":map", text that is
///< displayed different from what it is
HLF_EOB, ///< after the last line in the buffer
HLF_TERM, ///< terminal cursor focused