aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/channel.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-08-12 15:04:28 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-08-28 14:18:05 -0300
commit5b7a66ec3dc4d5130ee8de2c958ce917bc248702 (patch)
tree4346d7a590715946b7f0d1f09485f097daa55357 /src/nvim/os/channel.c
parenta1400896b3e458ede63507b6efe20c32736a6729 (diff)
downloadrneovim-5b7a66ec3dc4d5130ee8de2c958ce917bc248702.tar.gz
rneovim-5b7a66ec3dc4d5130ee8de2c958ce917bc248702.tar.bz2
rneovim-5b7a66ec3dc4d5130ee8de2c958ce917bc248702.zip
api: Implement '--embedded-mode' command-line option
This option makes nvim run in "embedded mode", which creates an API channel via stdin/stdout and disables all terminal-related code
Diffstat (limited to 'src/nvim/os/channel.c')
-rw-r--r--src/nvim/os/channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/os/channel.c b/src/nvim/os/channel.c
index 22d31608a5..2c1928f3b3 100644
--- a/src/nvim/os/channel.c
+++ b/src/nvim/os/channel.c
@@ -67,6 +67,10 @@ void channel_init(void)
channels = pmap_new(uint64_t)();
event_strings = pmap_new(cstr_t)();
msgpack_sbuffer_init(&out_buffer);
+
+ if (embedded_mode) {
+ channel_from_stdio();
+ }
}
/// Teardown the module