mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 14:58:18 +00:00
ui: implement ext_messages
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
This commit is contained in:
@@ -19597,7 +19597,10 @@ void ex_echo(exarg_T *eap)
|
||||
msg_puts_attr(" ", echo_attr);
|
||||
}
|
||||
char *tofree = encode_tv2echo(&rettv, NULL);
|
||||
msg_multiline_attr(tofree, echo_attr);
|
||||
if (*tofree != NUL) {
|
||||
msg_ext_set_kind("echo");
|
||||
msg_multiline_attr(tofree, echo_attr);
|
||||
}
|
||||
xfree(tofree);
|
||||
}
|
||||
tv_clear(&rettv);
|
||||
@@ -19689,11 +19692,13 @@ void ex_execute(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (eap->cmdidx == CMD_echomsg) {
|
||||
msg_ext_set_kind("echomsg");
|
||||
MSG_ATTR(ga.ga_data, echo_attr);
|
||||
ui_flush();
|
||||
} else if (eap->cmdidx == CMD_echoerr) {
|
||||
/* We don't want to abort following commands, restore did_emsg. */
|
||||
save_did_emsg = did_emsg;
|
||||
msg_ext_set_kind("echoerr");
|
||||
EMSG((char_u *)ga.ga_data);
|
||||
if (!force_abort)
|
||||
did_emsg = save_did_emsg;
|
||||
|
Reference in New Issue
Block a user