branch: externals/cape
commit 9e4651649b5d47d5f74615e1dc8cc0b676e5ff38
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Treat company backends as non-interruptible.
---
cape.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cape.el b/cape.el
index 7985f62429..f1e0404ae5 100644
--- a/cape.el
+++ b/cape.el
@@ -720,11 +720,13 @@ If INTERACTIVE is nil the function acts like a capf."
(defun cape--company-call (backend &rest args)
"Call Company BACKEND with ARGS."
- (pcase (apply backend args)
+ ;; Company backends are non-interruptible!
+ (pcase (let (throw-on-input) (apply backend args))
(`(:async . ,fetcher)
(let ((res 'trash)
(start (time-to-seconds)))
- (funcall fetcher (lambda (arg) (setq res arg)))
+ ;; Company backends are non-interruptible!
+ (let (throw-on-input) (funcall fetcher (lambda (arg) (setq res arg))))
;; Force synchronization
(while (eq res 'trash)
(sleep-for company-async-wait)