aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authornwounkn <nwounkn@gmail.com>2023-10-13 12:01:26 +0500
committerzeertzjq <zeertzjq@outlook.com>2023-10-14 14:23:08 +0800
commit13f55750e9bea8ec8f50550546edc64a0f0964d8 (patch)
tree741aa03b9f0d2edc53c210f5b9bebba251c8d9fb /src/nvim/lua/executor.c
parentce0f80835a5f6febd64f4ce5cf245d476ebaecfd (diff)
downloadrneovim-13f55750e9bea8ec8f50550546edc64a0f0964d8.tar.gz
rneovim-13f55750e9bea8ec8f50550546edc64a0f0964d8.tar.bz2
rneovim-13f55750e9bea8ec8f50550546edc64a0f0964d8.zip
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`
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index d6fd14cc10..3975312703 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -955,7 +955,9 @@ static void nlua_print_event(void **argv)
break;
}
msg(str + start, 0);
- msg_didout = true; // Make blank lines work properly
+ if (msg_silent == 0) {
+ msg_didout = true; // Make blank lines work properly
+ }
}
if (len && str[len - 1] == NUL) { // Last was newline
msg("", 0);