emacs-diffs
[Top][All Lists]
Advanced

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

master 6deeda411c: Fix display of long completions.


From: Gregory Heytings
Subject: master 6deeda411c: Fix display of long completions.
Date: Mon, 28 Nov 2022 07:18:47 -0500 (EST)

branch: master
commit 6deeda411c0d2e25eab68ec4c2dccb626937e375
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Fix display of long completions.
    
    * lisp/minibuffer.el (completion--insert-strings): Do not assume
    "at least 2 columns", which is not possible when completion
    strings are long, e.g. with completions-detailed set.
---
 lisp/minibuffer.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 6bb0fa3ae9..5faa3c8d4e 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2025,8 +2025,8 @@ Runs of equal candidate strings are eliminated.  
GROUP-FUN is a
           (window (get-buffer-window (current-buffer) 0))
           (wwidth (if window (1- (window-width window)) 79))
           (columns (min
-                    ;; At least 2 columns; at least 2 spaces between columns.
-                    (max 2 (/ wwidth (+ 2 length)))
+                    ;; At least 2 spaces between columns.
+                    (max 1 (/ wwidth (+ 2 length)))
                     ;; Don't allocate more columns than we can fill.
                     ;; Windows can't show less than 3 lines anyway.
                     (max 1 (/ (length strings) 2))))



reply via email to

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