mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
messages: echo "line1\r\nline2" should not clear line1
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user