[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 5214170 6/6: Add base string when previewing the
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/corfu 5214170 6/6: Add base string when previewing the current candidate |
Date: |
Sat, 17 Apr 2021 18:26:56 -0400 (EDT) |
branch: externals/corfu
commit 5214170fd416efe395cbeb33d4fc4391189070c3
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add base string when previewing the current candidate
---
corfu.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/corfu.el b/corfu.el
index 4c623ae..e28831a 100644
--- a/corfu.el
+++ b/corfu.el
@@ -394,7 +394,7 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(not (and (= (car bounds) (length str)) (test-completion str table
pred)))
;; XXX Completion is terminated if there are no matches. Add
optional confirmation?
corfu--candidates
- ;; Single candidate
+ ;; Single candidate, which matches input exactly
(not (equal corfu--candidates (list str))))
(let* ((start (min (max 0 (- corfu--index (/ corfu-count 2)))
(max 0 (- corfu--total corfu-count))))
@@ -408,7 +408,7 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(let ((ov (make-overlay beg end nil t t)))
(overlay-put ov 'priority 1000)
(overlay-put ov 'window (selected-window))
- (overlay-put ov 'display (nth curr cands))
+ (overlay-put ov 'display (concat (substring str 0 corfu--base)
(nth curr cands)))
(push ov corfu--overlays)))
;; Nonlinearity at the end and the beginning
(when (/= start 0)
- [elpa] externals/corfu updated (4c2c997 -> 5214170), Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu e226da3 1/6: Oops, use `:global nil` instead of `:local t`, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 68d799a 2/6: Revert "Add corfu-completion-styles", Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 6c361fd 3/6: README: Update caveats section, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 4c2d5de 4/6: Update readme, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 59263bf 5/6: Hide scrollbar if there are fewer than corfu-count candidates, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 5214170 6/6: Add base string when previewing the current candidate,
Protesilaos Stavrou <=