emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu 0b17ff6cfd: completion--replace mutates the strin


From: ELPA Syncer
Subject: [elpa] externals/corfu 0b17ff6cfd: completion--replace mutates the string :/
Date: Sun, 23 Jan 2022 01:57:34 -0500 (EST)

branch: externals/corfu
commit 0b17ff6cfd526d1ec48ede9bf448f97910ecbc6e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    completion--replace mutates the string :/
---
 corfu.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/corfu.el b/corfu.el
index 10516a4e80..805cbd023e 100644
--- a/corfu.el
+++ b/corfu.el
@@ -961,7 +961,7 @@ there hasn't been any input, then quit."
         (pcase (completion-try-completion str table pred pt metadata)
           (`(,newstr . ,newpt)
            (unless (equal str newstr)
-             (completion--replace beg end newstr))
+             (completion--replace beg end (concat newstr)))
            (goto-char (+ beg newpt))))))
     ;; No further completion is possible and the current string is a valid
     ;; match, exit with status 'finished.
@@ -1079,7 +1079,7 @@ See `completion-in-region' for the arguments BEG, END, 
TABLE, PRED."
                  end (copy-marker end t)
                  completion-in-region--data (list beg end table pred))
            (unless (equal str newstr)
-             (completion--replace beg end newstr))
+             (completion--replace beg end (concat newstr)))
            (goto-char (+ beg newpt))
            (if (= total 1)
                (when exit
@@ -1110,7 +1110,7 @@ See `completion-in-region' for the arguments BEG, END, 
TABLE, PRED."
          (map (make-sparse-keymap))
          (replace (lambda ()
                     (interactive)
-                    (completion--replace beg end (nth idx cands))
+                    (completion--replace beg end (concat (nth idx cands)))
                     (corfu--message "Cycling %d/%d..." (1+ idx) total)
                     (setq idx (mod (1+ idx) total))
                     (set-transient-map map))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]