summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-11-12 14:00:44 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-11-12 14:00:44 +0100
commita0fd22225bdb5088d6d3775d6ee6be6f43dbd37d (patch)
tree95880255810898d832c19bffb7d659f813a58154
parent48e55b77197961b0f49f1e74f993400a708e91d2 (diff)
Use completion-try-completion for TAB completion check
-rw-r--r--corfu.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/corfu.el b/corfu.el
index 96770bf..caf0528 100644
--- a/corfu.el
+++ b/corfu.el
@@ -728,10 +728,7 @@ A scroll bar is displayed from LO to LO+BAR."
;; completion is possible and the current string is a valid match, exit
;; with status 'finished.
((and (memq this-command '(corfu-complete completion-at-point))
- ;; XXX We should probably use `completion-try-completion' here instead
- ;; but it does not work as well when completing in `shell-mode'.
- ;; (not (consp (completion-try-completion str table pred pt metadata)))
- (not (stringp (try-completion str table pred)))
+ (not (consp (completion-try-completion str table pred pt corfu--metadata)))
(test-completion str table pred))
(corfu--done str 'finished))
;; 4) There are no candidates & corfu-quit-no-match => Confirmation popup