mirror of
https://github.com/neovim/neovim.git
synced 2025-10-19 16:21:51 +00:00
feat(ui): no delay for errors with ext_messages (#33693)
Problem: Delay for reading a message may be unwanted for ext_messages, and can be done by the implementation. Empty completion source error message is not distinguishable as such. Solution: Only delay without ext_messages enabled. Emit empty completion source message as an error.
This commit is contained in:
@@ -94,7 +94,7 @@ void change_warning(buf_T *buf, int col)
|
||||
set_vim_var_string(VV_WARNINGMSG, _(w_readonly), -1);
|
||||
msg_clr_eos();
|
||||
msg_end();
|
||||
if (msg_silent == 0 && !silent_mode && ui_active()) {
|
||||
if (msg_silent == 0 && !silent_mode && ui_active() && !ui_has(kUIMessages)) {
|
||||
ui_flush();
|
||||
os_delay(1002, true); // give the user time to think about it
|
||||
}
|
||||
@@ -133,7 +133,7 @@ void changed(buf_T *buf)
|
||||
// Wait two seconds, to make sure the user reads this unexpected
|
||||
// message. Since we could be anywhere, call wait_return() now,
|
||||
// and don't let the emsg() set msg_scroll.
|
||||
if (need_wait_return && emsg_silent == 0 && !in_assert_fails) {
|
||||
if (need_wait_return && emsg_silent == 0 && !in_assert_fails && !ui_has(kUIMessages)) {
|
||||
ui_flush();
|
||||
os_delay(2002, true);
|
||||
wait_return(true);
|
||||
|
Reference in New Issue
Block a user