aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/charset.h')
-rw-r--r--src/nvim/charset.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/charset.h b/src/nvim/charset.h
index 78d6f2a76c..c69582c4c6 100644
--- a/src/nvim/charset.h
+++ b/src/nvim/charset.h
@@ -1,6 +1,20 @@
#ifndef NVIM_CHARSET_H
#define NVIM_CHARSET_H
+#include "nvim/types.h"
+#include "nvim/pos.h"
+#include "nvim/buffer_defs.h"
+
+/// Return the folded-case equivalent of the given character
+///
+/// @param[in] c Character to transform.
+///
+/// @return Folded variant.
+#define CH_FOLD(c) \
+ utf_fold((sizeof(c) == sizeof(char)) \
+ ?((int)(uint8_t)(c)) \
+ :((int)(c)))
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "charset.h.generated.h"
#endif