From 835ff2d2fba460f09f39d40c222eb4f594b60c3a Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sun, 11 Dec 2022 19:02:51 +0100 Subject: Simplify --- corfu.el | 13 +++---------- 1 file 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) -- cgit v1.0