aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval.h
diff options
context:
space:
mode:
authorglacambre <code@lacamb.re>2021-10-03 16:19:25 +0200
committerglacambre <code@lacamb.re>2022-01-24 13:59:16 +0100
commita4069a3eed65f14b1149c6cda8638dcb49ab5027 (patch)
treedc0f0c1af6f8a9070340745c8f939b8a7d875d82 /src/nvim/eval/typval.h
parent326e74571be43823ded9fa805a3173bdabda6bec (diff)
downloadrneovim-a4069a3eed65f14b1149c6cda8638dcb49ab5027.tar.gz
rneovim-a4069a3eed65f14b1149c6cda8638dcb49ab5027.tar.bz2
rneovim-a4069a3eed65f14b1149c6cda8638dcb49ab5027.zip
feat(--headless): add on_print callback to stdioopen
This commit adds an on_print callback to stdioopen's dictionary argument which lets the caller specify a function called each time neovim will try to output something to stdout (e.g. on "echo" or "echoerr" in --headless mode).
Diffstat (limited to 'src/nvim/eval/typval.h')
-rw-r--r--src/nvim/eval/typval.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h
index d1275d6512..ad01c01499 100644
--- a/src/nvim/eval/typval.h
+++ b/src/nvim/eval/typval.h
@@ -81,7 +81,8 @@ typedef struct {
} data;
CallbackType type;
} Callback;
-#define CALLBACK_NONE ((Callback){ .type = kCallbackNone })
+#define CALLBACK_INIT { .type = kCallbackNone }
+#define CALLBACK_NONE ((Callback)CALLBACK_INIT)
/// Structure holding dictionary watcher
typedef struct dict_watcher {