aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/highlight.h')
-rw-r--r--src/nvim/highlight.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/highlight.h b/src/nvim/highlight.h
index 8c8657ae77..e5d3f3d1ca 100644
--- a/src/nvim/highlight.h
+++ b/src/nvim/highlight.h
@@ -29,3 +29,6 @@ static inline int win_hl_attr(win_T *wp, int hlf)
rgb_bg = rgb_bg != -1 ? rgb_bg : (dark_ ? 0x000000 : 0xFFFFFF); \
rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
} while (0);
+
+// Enums need a typecast to be used as array index.
+#define HL_ATTR(n) hl_attr_active[(int)(n)]