aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-08-28 14:39:20 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-08-28 14:39:20 -0300
commite0d812ab649c40b8cc0efbfbe5214fb5dd407e8f (patch)
treeed4bf469e4e2c71120d8bc2df60c0bd2f077bdf7 /src/nvim/os_unix.c
parent7f9ec6c04f3949e6d666c1586efc20a4a79be257 (diff)
parentdd90dbeeba15af4ef401327ba3996caccd34f719 (diff)
downloadrneovim-e0d812ab649c40b8cc0efbfbe5214fb5dd407e8f.tar.gz
rneovim-e0d812ab649c40b8cc0efbfbe5214fb5dd407e8f.tar.bz2
rneovim-e0d812ab649c40b8cc0efbfbe5214fb5dd407e8f.zip
Merge PR #1060 'Implement --embedded-mode command-line option'
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r--src/nvim/os_unix.c12
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);