[mini.test] Why type_keys
uses async nvim_input
instead of sync nvim_feedkeys
?
#1336
-
My point it, even with some non-zero |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I don't quite remember the details, but I think it was a combination of several things:
Basically I'd say expect that keys themselves are processed right away but if they are meant to trigger async response, then it depends on the nature of that response about how long to wait until it has effect. |
Beta Was this translation helpful? Give feedback.
I don't quite remember the details, but I think it was a combination of several things:
nvim_input()
should to be a closer way to emulate how user presses keys. Specifically because it is non-blocking. With default zerowait
each argument's keys just happens instantaneously while arguments are separated by event loop calls.nvim_feedkeys()
was an obstacle for some cases of testing key sequences that block the editor. Like pressingd
puts Neovim in Operator-pending mode which awaits user input. But I am not 100% sure here.