GNU bug report logs -
#59486
completion-auto-wrap disobeyed by vertical navigation
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 22 Nov 2022 17:46:01 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 59486 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> In a multi-column layout, the keys <left> and <right>
> wrap to the beginning/end of the completions buffer,
> but <up> and <down> don't. Here is a patch that supports
> completion-auto-wrap for wrapping to the top/bottom:
Now pushed. And here are the corresponding commands for
navigating the completions buffer from the minibuffer:
[minibuffer-next-completion.patch (text/x-diff, inline)]
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 6bb0fa3ae98..ea1e88c7234 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -4452,7 +4456,7 @@ minibuffer-completion-auto-choose
:type 'boolean
:version "29.1")
-(defun minibuffer-next-completion (&optional n)
+(defun minibuffer-next-completion (&optional n vertical)
"Move to the next item in its completions window from the minibuffer.
When `minibuffer-completion-auto-choose' is non-nil, then also
insert the selected completion to the minibuffer."
@@ -4461,7 +4465,9 @@ minibuffer-next-completion
(with-minibuffer-completions-window
(when completions-highlight-face
(setq-local cursor-face-highlight-nonselected-window t))
- (next-completion (or n 1))
+ (if vertical
+ (next-line-completion (or n 1))
+ (next-completion (or n 1)))
(when auto-choose
(let ((completion-use-base-affixes t))
(choose-completion nil t t))))))
@@ -4473,6 +4479,20 @@ minibuffer-previous-completion
(interactive "p")
(minibuffer-next-completion (- (or n 1))))
+(defun minibuffer-next-line-completion (&optional n)
+ "Move to the next completion line from the minibuffer.
+When `minibuffer-completion-auto-choose' is non-nil, then also
+insert the selected completion to the minibuffer."
+ (interactive "p")
+ (minibuffer-next-completion (or n 1) t))
+
+(defun minibuffer-previous-line-completion (&optional n)
+ "Move to the previous completion line from the minibuffer.
+When `minibuffer-completion-auto-choose' is non-nil, then also
+insert the selected completion to the minibuffer."
+ (interactive "p")
+ (minibuffer-next-completion (- (or n 1)) t))
+
(defun minibuffer-choose-completion (&optional no-exit no-quit)
"Run `choose-completion' from the minibuffer in its completions window.
With prefix argument NO-EXIT, insert the completion at point to the
This bug report was last modified 1 year and 192 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.