mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
fix(messages): single event for multi-expr :echo (#34393)
Problem: Separate "msg_show" event for each expression in a multi-expr :echo(n) command. Solution: Only set the kind when `atstart == true`.
This commit is contained in:
@@ -7846,6 +7846,7 @@ void ex_echo(exarg_T *eap)
|
||||
if (!eap->skip) {
|
||||
if (atstart) {
|
||||
atstart = false;
|
||||
msg_ext_set_kind("echo");
|
||||
// Call msg_start() after eval1(), evaluating the expression
|
||||
// may cause a message to appear.
|
||||
if (eap->cmdidx == CMD_echo) {
|
||||
@@ -7862,7 +7863,6 @@ void ex_echo(exarg_T *eap)
|
||||
}
|
||||
char *tofree = encode_tv2echo(&rettv, NULL);
|
||||
if (*tofree != NUL) {
|
||||
msg_ext_set_kind("echo");
|
||||
msg_ext_append = eap->cmdidx == CMD_echon;
|
||||
msg_multiline(cstr_as_string(tofree), echo_hl_id, true, false, &need_clear);
|
||||
}
|
||||
|
Reference in New Issue
Block a user