aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/types.h')
-rw-r--r--src/nvim/types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/types.h b/src/nvim/types.h
index 7b23fe419b..86ef64a9a9 100644
--- a/src/nvim/types.h
+++ b/src/nvim/types.h
@@ -42,6 +42,8 @@ typedef enum {
#define TRISTATE_TO_BOOL(val, \
default) ((val) == kTrue ? true : ((val) == kFalse ? false : (default)))
+#define TRISTATE_FROM_INT(val) ((val) == 0 ? kFalse : ((val) >= 1 ? kTrue : kNone))
+
typedef struct Decoration Decoration;
#ifndef ORDER_BIG_ENDIAN