]> git.eshelyaron.com Git - emacs.git/commitdiff
Make the *Ido COmpletions* buffer fit the window to the buffer
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 26 Aug 2022 12:02:57 +0000 (14:02 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 26 Aug 2022 12:02:57 +0000 (14:02 +0200)
* lisp/ido.el (ido-completion-help): Display the ido completions
buffer pretty much the same way that the default *Completions*
buffer is displayed (bug#50671).  This means that we're defaulting
to fit-window-to-buffer.

lisp/ido.el

index 134081d675957ee122dbcbd70ecef5752b10571c..520513b1d29ae8b5699c6dd1cae591a8cdb14689 100644 (file)
@@ -3966,7 +3966,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
     (if (and (eq last-command this-command) temp-buf)
        ;; scroll buffer
        (let (win (buf (current-buffer)))
-         (display-buffer temp-buf nil nil)
+         (display-buffer temp-buf)
          (set-buffer temp-buf)
          (setq win (get-buffer-window temp-buf))
          (if (pos-visible-in-window-p (point-max) win)
@@ -3981,7 +3981,10 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
          (set-buffer buf))
       (setq display-it t))
     (if (and ido-completion-buffer display-it)
-       (with-output-to-temp-buffer ido-completion-buffer
+       (with-temp-buffer-window ido-completion-buffer
+            '((display-buffer-reuse-window display-buffer-at-bottom)
+              (window-height . fit-window-to-buffer))
+            nil
          (let* ((comps
                  (cond
                   (ido-directory-too-big