mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(event-loop): flush UI when no input is available (#25728)
Problem: With lots of events, UI flush may be delayed for too long. Solution: Flush UI when no input is available. This still flushes less frequently than before #25629, when a flush also happens when typeahead buffer is empty but input is available.
This commit is contained in:
parent
6c87d3e0fb
commit
ad2fad9a3b
@ -59,6 +59,8 @@ getkey:
|
||||
if (vpeekc() != NUL || typebuf.tb_len > 0) {
|
||||
key = safe_vgetc();
|
||||
} else if (!multiqueue_empty(main_loop.events)) {
|
||||
// No input available and processing events may take time, flush now.
|
||||
ui_flush();
|
||||
// Event was made available after the last multiqueue_process_events call
|
||||
key = K_EVENT;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user