mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
feat(ui): emit "msg_clear" event after clearing the screen (#34035)
Problem: ext_messages cannot tell when the screen was cleared, which is needed to clear visible messages. An empty message is also never emitted, but clears messages from the message grid. Solution: Repurpose the "msg_clear" event to be emitted when the screen was cleared. Emit an empty message with the `empty` kind to hint to a UI to clear the cmdline area.
This commit is contained in:
@@ -264,6 +264,9 @@ void screenclear(void)
|
||||
msg_grid_invalid = false;
|
||||
clear_cmdline = true;
|
||||
}
|
||||
if (ui_has(kUIMessages)) {
|
||||
ui_call_msg_clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// Unlike cmdline "one_key" prompts, the message part of the prompt is not stored
|
||||
|
Reference in New Issue
Block a user