diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2022-08-21 23:26:49 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2022-08-21 23:26:49 -0600 |
commit | 73ede4a508517f8e55c75d710f13851eb8079875 (patch) | |
tree | b4cccc61b70c28b1474d74d2ff4bff856929cdca /src/nvim/api/vimscript.c | |
parent | 8436383af96dc7afa3596fc22c012d68e76f47f8 (diff) | |
parent | 72b03792b6428ca96ca779b53061c6c98f6f930f (diff) | |
download | rneovim-73ede4a508517f8e55c75d710f13851eb8079875.tar.gz rneovim-73ede4a508517f8e55c75d710f13851eb8079875.tar.bz2 rneovim-73ede4a508517f8e55c75d710f13851eb8079875.zip |
Merge remote-tracking branch 'upstream/master' into usermarks
Diffstat (limited to 'src/nvim/api/vimscript.c')
-rw-r--r-- | src/nvim/api/vimscript.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/api/vimscript.c b/src/nvim/api/vimscript.c index 478e146781..a28bfd2ab9 100644 --- a/src/nvim/api/vimscript.c +++ b/src/nvim/api/vimscript.c @@ -14,8 +14,9 @@ #include "nvim/eval.h" #include "nvim/eval/typval.h" #include "nvim/eval/userfunc.h" -#include "nvim/ex_cmds2.h" +#include "nvim/ex_docmd.h" #include "nvim/ops.h" +#include "nvim/runtime.h" #include "nvim/strings.h" #include "nvim/vim.h" #include "nvim/viml/parser/expressions.h" @@ -48,6 +49,7 @@ String nvim_exec(uint64_t channel_id, String src, Boolean output, Error *err) { const int save_msg_silent = msg_silent; garray_T *const save_capture_ga = capture_ga; + const int save_msg_col = msg_col; garray_T capture_local; if (output) { ga_init(&capture_local, 1, 80); @@ -57,6 +59,7 @@ String nvim_exec(uint64_t channel_id, String src, Boolean output, Error *err) try_start(); if (output) { msg_silent++; + msg_col = 0; // prevent leading spaces } const sctx_T save_current_sctx = api_set_sctx(channel_id); @@ -65,6 +68,8 @@ String nvim_exec(uint64_t channel_id, String src, Boolean output, Error *err) if (output) { capture_ga = save_capture_ga; msg_silent = save_msg_silent; + // Put msg_col back where it was, since nothing should have been written. + msg_col = save_msg_col; } current_sctx = save_current_sctx; |