fix(ui): empty line before the next message after :silent command

Problem:
  The next command after `silent !{cmd}` or `silent lua print('str')`
  prints an empty line before printing a message, because these commands
  set `msg_didout = true` despite not printing any messages.

Solution:
  Set `msg_didout = true` only if `msg_silent == 0`
This commit is contained in:
nwounkn
2023-10-13 12:01:26 +05:00
committed by zeertzjq
parent 1e71797db7
commit b90dd608a9
4 changed files with 56 additions and 3 deletions

View File

@@ -1689,7 +1689,9 @@ static void write_msg(String message, bool to_err, bool writeln)
if (c == NL) { \
kv_push(line_buf, NUL); \
msg(line_buf.items); \
msg_didout = true; \
if (msg_silent == 0) { \
msg_didout = true; \
} \
kv_drop(line_buf, kv_size(line_buf)); \
kv_resize(line_buf, LINE_BUFFER_MIN_SIZE); \
} else if (c == NUL) { \