summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-08-26 14:02:57 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-08-26 14:02:57 +0200
commit4cb31b19353d3d1f8629d7c7b55aff2445efc02a (patch)
treed5529ffcb0d2d156bd49fe52de357324eb7e5fe4
parent54a0c9569ee08a68333dda40b762d56794a5e7be (diff)
downloademacs-4cb31b19353d3d1f8629d7c7b55aff2445efc02a.tar.gz
Make the *Ido COmpletions* buffer fit the window to the buffer
* 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.
-rw-r--r--lisp/ido.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 134081d6759..520513b1d29 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -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