summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-12-11 19:02:51 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-12-11 19:02:51 +0100
commit835ff2d2fba460f09f39d40c222eb4f594b60c3a (patch)
tree6685f8e75384312168913cdd1bff44a94a78cb7e
parenta501b92ee33227ca720da389e69991863498d0c2 (diff)
Simplify
-rw-r--r--corfu.el13
1 files changed, 3 insertions, 10 deletions
diff --git a/corfu.el b/corfu.el
index c93c870..4270a76 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1139,19 +1139,12 @@ ASYNC may be an asynchronous capf result."
(lambda ()
;; Ask the backend for refreshing
(funcall fun (lambda (ret)
+ ;; TODO ensure that this runs in the correct buffer.
(pcase ret
(`(,beg ,end ,table . ,plist)
- ;; TODO ensure that this runs in the correct buffer.
- ;; TODO check validity of boundaries
- ;; If valid, update completion data and UI.
- (setq completion-in-region--data
- (list (if (markerp beg) beg (copy-marker beg))
- (copy-marker end t)
- table
- (plist-get plist :predicate))
- corfu--extra plist)
+ ;; TODO Check validity of boundaries.
+ ;; If valid, update UI. Otherwise quit.
(corfu--post-command))
- ;; TODO ensure correct buffer
(_ (corfu-quit)))))
;; Return t, since the predicate is invoked asynchronously
t)