diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/message.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 4c20edb7eb..6fc102e4ff 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -3183,7 +3183,11 @@ void msg_ext_flush_showmode(void) { // Showmode messages doesn't interrupt normal message flow, so we use // separate event. Still reuse the same chunking logic, for simplicity. - if (ui_has(kUIMessages)) { + // This is called unconditionally; check if we are emitting, or have + // emitted non-empty "content". + static bool clear = false; + if (ui_has(kUIMessages) && (msg_ext_last_attr != -1 || clear)) { + clear = msg_ext_last_attr != -1; msg_ext_emit_chunk(); Array *tofree = msg_ext_init_chunks(); ui_call_msg_showmode(*tofree); |