aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/highlight_defs.h')
-rw-r--r--src/nvim/highlight_defs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h
index 5f637228ba..09d20c75ea 100644
--- a/src/nvim/highlight_defs.h
+++ b/src/nvim/highlight_defs.h
@@ -8,6 +8,8 @@
typedef int32_t RgbValue;
/// Highlighting attribute bits.
+///
+/// sign bit should not be used here, as it identifies invalid highlight
typedef enum {
HL_INVERSE = 0x01,
HL_BOLD = 0x02,
@@ -35,6 +37,17 @@ typedef struct attr_entry {
.cterm_bg_color = 0, \
}
+// sentinel value that compares unequal to any valid highlight
+#define HLATTRS_INVALID (HlAttrs) { \
+ .rgb_ae_attr = -1, \
+ .cterm_ae_attr = -1, \
+ .rgb_fg_color = -1, \
+ .rgb_bg_color = -1, \
+ .rgb_sp_color = -1, \
+ .cterm_fg_color = 0, \
+ .cterm_bg_color = 0, \
+}
+
/// Values for index in highlight_attr[].
/// When making changes, also update hlf_names below!
typedef enum {