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

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

[elpa] externals/consult a055b4cde4: Use the base-size returned by compl


From: ELPA Syncer
Subject: [elpa] externals/consult a055b4cde4: Use the base-size returned by completion-all-completions correctly
Date: Tue, 14 Jan 2025 18:57:44 -0500 (EST)

branch: externals/consult
commit a055b4cde4d8038c5cd57251e0985835bc17cf16
Author: Spencer Baugh <sbaugh@janestreet.com>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Use the base-size returned by completion-all-completions correctly
    
    Using completion-boundaries here is incorrect and doesn't work in
    practice for completion tables with non-trivial boundaries.  The
    correct thing to do is to use the base-size returned as the cdr of the
    last element of completion-all-completions.
---
 consult.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/consult.el b/consult.el
index 216678033a..78c6a6638c 100644
--- a/consult.el
+++ b/consult.el
@@ -3341,13 +3341,12 @@ value for `completion-in-region-function'."
              (or (not (consp (ignore-errors (nthcdr threshold all))))
                  (and completion-cycling completion-all-sorted-completions)))
         (completion--in-region start end collection predicate)
-      (let* ((limit (car (completion-boundaries initial collection predicate 
"")))
-             (this-command #'consult-completion-in-region)
+      (let* ((this-command #'consult-completion-in-region)
              (completion
               (cond
                ((atom all) nil)
                ((and (consp all) (atom (cdr all)))
-                (concat (substring initial 0 limit) (car all)))
+                (concat (substring initial 0 (cdr all)) (car all)))
                (t
                 (consult--local-let ((enable-recursive-minibuffers t))
                   ;; Evaluate completion table in the original buffer.



reply via email to

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