Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use unread-command-events when cancelling inline completion
When the inline completion handles `[t]`, we want it to tear down the completion UI and act as if nothing had happened. That works fine for single key events (escape, a-z (self-insert-command), etc.). Trying to use multi-key commands, on the other hand fails: If `C-x w q` is bound (e.g. `quit-restore-window`), starting the key combination when inline completion is active would result in cancel-with-input function being called only with `C-x` as last-key. If we lookup C-x , it's not bound to a command, so we do not execute anything. The user then proceeds to type `w q` and ends up inserting the text "wq" instead of quitting the window. This fixes that by using the unread-command-events -- that basically leaves some input to be handled by the next iteration of the event loop. As a result, we can now successfully call complex key combinations when the inline completion is active.
- Loading branch information