mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 13:28:19 +00:00
Merge pull request #17279 from zeertzjq/state-enter-vpeekc
fix(event-loop): call vpeekc() directly first to check for character
This commit is contained in:
@@ -3189,7 +3189,7 @@ static void getchar_common(typval_T *argvars, typval_T *rettv)
|
||||
if (argvars[0].v_type == VAR_UNKNOWN) {
|
||||
// getchar(): blocking wait.
|
||||
// TODO(bfredl): deduplicate shared logic with state_enter ?
|
||||
if (!(char_avail() || using_script() || input_available())) {
|
||||
if (!char_avail()) {
|
||||
(void)os_inchar(NULL, 0, -1, 0, main_loop.events);
|
||||
if (!multiqueue_empty(main_loop.events)) {
|
||||
state_handle_k_event();
|
||||
|
Reference in New Issue
Block a user