refactor(message): simplify msg_puts_display and use batched grid updates

msg_puts_display was more complex than necessary in nvim, as in
nvim, it no longer talks directly with a terminal.

In particular we don't need to scroll the grid before emiting the last
char. The TUI already takes care of things like that, for terminals
where it matters.
This commit is contained in:
bfredl
2023-09-30 10:31:55 +02:00
parent 08aea256c8
commit a9a48d6b5f
10 changed files with 152 additions and 255 deletions

View File

@@ -8094,13 +8094,6 @@ void ex_execute(exarg_T *eap)
}
if (ret != FAIL && ga.ga_data != NULL) {
if (eap->cmdidx == CMD_echomsg || eap->cmdidx == CMD_echoerr) {
// Mark the already saved text as finishing the line, so that what
// follows is displayed on a new line when scrolling back at the
// more prompt.
msg_sb_eol();
}
if (eap->cmdidx == CMD_echomsg) {
msg_ext_set_kind("echomsg");
msg(ga.ga_data, echo_attr);