diff options
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r-- | src/nvim/os_unix.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index af17676ebf..3fa8b803b2 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -54,6 +54,7 @@ #include "nvim/os/shell.h" #include "nvim/os/signal.h" #include "nvim/os/job.h" +#include "nvim/os/msgpack_rpc.h" #if defined(HAVE_SYS_IOCTL_H) # include <sys/ioctl.h> @@ -88,6 +89,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); @@ -152,6 +165,7 @@ void mch_init(void) mac_conv_init(); #endif + msgpack_rpc_init(); event_init(); } @@ -314,7 +328,7 @@ int len /* buffer size, only used when name gets longer */ struct dirent *dp; FileInfo file_info; - if (os_get_file_info_link((char *)name, &file_info)) { + if (os_fileinfo_link((char *)name, &file_info)) { /* Open the directory where the file is located. */ slash = vim_strrchr(name, '/'); if (slash == NULL) { @@ -340,8 +354,8 @@ int len /* buffer size, only used when name gets longer */ STRLCPY(newname + (tail - name), dp->d_name, MAXPATHL - (tail - name) + 1); FileInfo file_info_new; - if (os_get_file_info_link((char *)newname, &file_info_new) - && os_file_info_id_equal(&file_info, &file_info_new)) { + if (os_fileinfo_link((char *)newname, &file_info_new) + && os_fileinfo_id_equal(&file_info, &file_info_new)) { STRCPY(tail, dp->d_name); break; } |