diff options
| -rw-r--r-- | cape.el | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -882,13 +882,14 @@ If INTERACTIVE is nil the function acts like a capf." (funcall fetch (lambda (arg) (when (eq res 'cape--waiting) - (push 'cape--done unread-command-events)) - (setq res arg))) - (let ((ev (let (input-method-function) (read-event nil t)))) - (when (eq res 'cape--waiting) + (push 'cape--done unread-command-events) + (setq res arg)))) + (when (eq res 'cape--waiting) + (let ((ev (let (input-method-function) (read-event nil t)))) (unless (eq ev 'cape--done) - (push (cons t ev) unread-command-events)) - (throw toi t)))) + (push (cons t ev) unread-command-events) + (setq res 'cape--cancelled) + (throw toi t))))) (setq unread-command-events (delq 'cape--done unread-command-events))) (funcall fetch (lambda (arg) (setq res arg))) |
