diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-01-16 20:35:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 20:35:27 +0100 |
commit | 8fe0635e7338e32e8aedeb8f2e2c0f246876375c (patch) | |
tree | 0464fc18967fbcf1717c1fb29eae6be6945a4faa /src/nvim/eval.c | |
parent | 6e78b2162382718b638c4532a155e5c3f9ed7515 (diff) | |
parent | b4a92aadd274c21a32baa68e2a460910ef9c77f5 (diff) | |
download | rneovim-8fe0635e7338e32e8aedeb8f2e2c0f246876375c.tar.gz rneovim-8fe0635e7338e32e8aedeb8f2e2c0f246876375c.tar.bz2 rneovim-8fe0635e7338e32e8aedeb8f2e2c0f246876375c.zip |
Merge pull request #11723 from bfredl/nocleareol
messages: echo "line1\r\nline2" should not clear line1
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 5c19ce4047..9916ee3bd3 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -21242,6 +21242,7 @@ void ex_echo(exarg_T *eap) char_u *arg = eap->arg; typval_T rettv; bool atstart = true; + bool need_clear = true; const int did_emsg_before = did_emsg; if (eap->skip) @@ -21284,7 +21285,7 @@ void ex_echo(exarg_T *eap) char *tofree = encode_tv2echo(&rettv, NULL); if (*tofree != NUL) { msg_ext_set_kind("echo"); - msg_multiline_attr(tofree, echo_attr, true); + msg_multiline_attr(tofree, echo_attr, true, &need_clear); } xfree(tofree); } @@ -21297,7 +21298,9 @@ void ex_echo(exarg_T *eap) emsg_skip--; } else { // remove text that may still be there from the command - msg_clr_eos(); + if (need_clear) { + msg_clr_eos(); + } if (eap->cmdidx == CMD_echo) { msg_end(); } |