aboutsummaryrefslogtreecommitdiff
path: root/src/api/helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/helpers.h')
-rw-r--r--src/api/helpers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/helpers.h b/src/api/helpers.h
index 6d73b6f742..b1faf4edee 100644
--- a/src/api/helpers.h
+++ b/src/api/helpers.h
@@ -5,6 +5,12 @@
#include "api/defs.h"
+#define set_api_error(message, err) \
+ do { \
+ strncpy(err->msg, message, sizeof(err->msg)); \
+ err->set = true; \
+ } while (0)
+
/// Start block that may cause vimscript exceptions
void try_start(void);