cleanup: reduce some duplicate code, avoid function pointers for a condition

Add 'multiline' flag to history for correct :messages output

Use larger buffer size for multiline messages. if this turns out to not
be enough, we could do size calculation like api_set_error
This commit is contained in:
Björn Linse
2019-01-18 12:16:58 +01:00
parent 67bac681ea
commit 27b7813025
5 changed files with 73 additions and 114 deletions

View File

@@ -19593,7 +19593,7 @@ void ex_echo(exarg_T *eap)
msg_puts_attr(" ", echo_attr);
}
char *tofree = encode_tv2echo(&rettv, NULL);
msg_echo_show(tofree, echo_attr);
msg_multiline_attr(tofree, echo_attr);
xfree(tofree);
}
tv_clear(&rettv);