diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-08-12 15:04:28 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-08-28 14:18:05 -0300 |
commit | 5b7a66ec3dc4d5130ee8de2c958ce917bc248702 (patch) | |
tree | 4346d7a590715946b7f0d1f09485f097daa55357 /src/nvim/os_unix.c | |
parent | a1400896b3e458ede63507b6efe20c32736a6729 (diff) | |
download | rneovim-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_unix.c')
-rw-r--r-- | src/nvim/os_unix.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index af17676ebf..1b092c8261 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -88,6 +88,18 @@ static int did_set_icon = FALSE; */ void mch_write(char_u *s, int len) { + if (embedded_mode) { + // TODO(tarruda): This is a temporary hack to stop Neovim from writing + // messages to stdout in embedded mode. In the future, embedded mode will + // be the only possibility(GUIs will always start neovim with a msgpack-rpc + // over stdio) and this function won't exist. + // + // The reason for this is because before Neovim fully migrates to a + // msgpack-rpc-driven architecture, we must have a fully functional + // UI working + return; + } + ignored = (int)write(1, (char *)s, len); if (p_wd) /* Unix is too fast, slow down a bit more */ os_microdelay(p_wd, false); |