emacs-diffs
[Top][All Lists]
Advanced

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

master 0284b296f2e: minibuffer-completion-help: Fix regression when END


From: Dmitry Gutov
Subject: master 0284b296f2e: minibuffer-completion-help: Fix regression when END < EOB
Date: Thu, 11 Apr 2024 13:33:43 -0400 (EDT)

branch: master
commit 0284b296f2ee469e0edeba8bd043b4a813cfd977
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    minibuffer-completion-help: Fix regression when END < EOB
    
    Which can happen with in-buffer completion (though this scenario
    is preffed off by default).
    
    * lisp/minibuffer.el (minibuffer-completion-help): Include the
    buffer contents after END into BASE-SUFFIX (bug#48356).
---
 lisp/minibuffer.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 3d0a6f9694f..ad6a0928cda 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2600,9 +2600,10 @@ The candidate will still be chosen by 
`choose-completion' unless
              (minibuffer-completion-base (substring string 0 base-size))
              (base-prefix (buffer-substring (minibuffer--completion-prompt-end)
                                             (+ start base-size)))
-             (base-suffix (completion-base-suffix start end
-                                                  minibuffer-completion-table
-                                                  
minibuffer-completion-predicate))
+             (base-suffix (concat (completion-base-suffix start end
+                                                          
minibuffer-completion-table
+                                                          
minibuffer-completion-predicate)
+                                  (buffer-substring end (point-max))))
              (all-md (completion--metadata (buffer-substring-no-properties
                                             start (point))
                                            base-size md



reply via email to

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