emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 d529207: lisp/minibuffer.el: Fix for bug#52169 regression


From: Stefan Monnier
Subject: emacs-28 d529207: lisp/minibuffer.el: Fix for bug#52169 regression
Date: Mon, 6 Dec 2021 09:43:22 -0500 (EST)

branch: emacs-28
commit d529207b0eb26b623fadf4716581add58f2cc282
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    lisp/minibuffer.el: Fix for bug#52169 regression
    
    * lisp/minibuffer.el (completion-table-subvert): Make sure we return
    a boundary that's not outside of the limit of the string.
---
 lisp/minibuffer.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index ca82b4a..21d610f 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -283,8 +283,9 @@ the form (concat S2 S)."
          ((eq (car-safe action) 'boundaries)
           (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0)))
             `(boundaries
-              ,(max (length s1)
-                    (+ beg (- (length s1) (length s2))))
+              ,(min (length string)
+                    (max (length s1)
+                         (+ beg (- (length s1) (length s2)))))
               . ,(and (eq (car-safe res) 'boundaries) (cddr res)))))
          ((stringp res)
           (if (string-prefix-p s2 res completion-ignore-case)



reply via email to

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