-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open
Labels
Milestone
Description
Proposal 1: API clients want a deterministic way to wait until "all input since now" has been processed.
- new API function e.g.
nvim_input_flush()
? - the function generates a new token and puts it in the input queue: API: nvim_input returns a "ticket" which can be used to confirm when the input is processed #30760
- the token is a pseudokey like
<id:xxx>
wherexxx
is a monotonic integer
- the token is a pseudokey like
nvim_input_flush()
blocks until the token is seen byos_inchar
Proposal 2 (alternative/additionally?): API clients want to know when specific input has been processed.
- new API function
nvim_input2({keys}, {callback})
: API: nvim_input returns a "ticket" which can be used to confirm when the input is processed #30760 - same as (2) in Proposal 2.
- When
os_inchar
sees a token it- invokes registered callbacks
- emits
nvim_input_event({token})
Reference: