From: Dmitry Gutov Date: Thu, 11 Apr 2024 17:33:16 +0000 (+0300) Subject: minibuffer-completion-help: Fix regression when END < EOB X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=abcdf5fb4dc103df7274d4ee4b7285c9be1b4877;p=emacs.git 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). (cherry picked from commit 0284b296f2ee469e0edeba8bd043b4a813cfd977) --- diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 98f299dd3a5..e6cc4b7837d 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3008,9 +3008,10 @@ completions list." (full-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)))) (style completion--matching-style) (exceptional-candidates (or (not completions-exclude-exceptional-candidates)