[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 48e55b7 5/5: corfu-complete: Remove TAB TAB magic
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 48e55b7 5/5: corfu-complete: Remove TAB TAB magic |
Date: |
Fri, 12 Nov 2021 07:57:13 -0500 (EST) |
branch: externals/corfu
commit 48e55b77197961b0f49f1e74f993400a708e91d2
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
corfu-complete: Remove TAB TAB magic
When no completion progress is made the first candidate was selected when
pressing TAB again. I almost never use this and I assume not many users are
aware of this unnecessary magic. Remove this for the sake of simplicity and
to
avoid surprises.
---
corfu.el | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/corfu.el b/corfu.el
index 24be468..96770bf 100644
--- a/corfu.el
+++ b/corfu.el
@@ -875,19 +875,9 @@ A scroll bar is displayed from LO to LO+BAR."
(str (buffer-substring-no-properties beg end))
(metadata (completion-metadata (substring str 0 pt) table
pred)))
(pcase (completion-try-completion str table pred pt metadata)
- ;; Prefix completion made progress.
((and `(,newstr . ,newpt) (guard (not (equal str newstr))))
(completion--replace beg end newstr)
- (goto-char (+ beg newpt)))
- ;; If we didn't make progress, the last command was `corfu-complete'
- ;; and we are not at completion boundary, continue with the first
candidate.
- ((guard (and (eq last-command #'corfu-complete)
- (> (length str) corfu--base)
- (> corfu--total 0)))
- (completion--replace beg end
- (concat (substring str 0 corfu--base)
- (substring-no-properties
- (car corfu--candidates))))))))))
+ (goto-char (+ beg newpt))))))))
(defun corfu--insert (status)
"Insert current candidate, exit with STATUS if non-nil."