aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /src/nvim/highlight.h
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-aucmd_textputpost.tar.gz
rneovim-aucmd_textputpost.tar.bz2
rneovim-aucmd_textputpost.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'src/nvim/highlight.h')
-rw-r--r--src/nvim/highlight.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nvim/highlight.h b/src/nvim/highlight.h
index 4da7dd65bb..e5d3f3d1ca 100644
--- a/src/nvim/highlight.h
+++ b/src/nvim/highlight.h
@@ -1,12 +1,12 @@
-#ifndef NVIM_HIGHLIGHT_H
-#define NVIM_HIGHLIGHT_H
+#pragma once
#include <stdbool.h>
-#include "nvim/api/private/defs.h"
-#include "nvim/buffer_defs.h"
-#include "nvim/highlight_defs.h"
-#include "nvim/option_defs.h"
+#include "nvim/api/keysets_defs.h"
+#include "nvim/api/private/defs.h" // IWYU pragma: keep
+#include "nvim/buffer_defs.h" // IWYU pragma: keep
+#include "nvim/highlight_defs.h" // IWYU pragma: export
+#include "nvim/option_vars.h"
#include "nvim/ui.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
@@ -30,4 +30,5 @@ static inline int win_hl_attr(win_T *wp, int hlf)
rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
} while (0);
-#endif // NVIM_HIGHLIGHT_H
+// Enums need a typecast to be used as array index.
+#define HL_ATTR(n) hl_attr_active[(int)(n)]