mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Fix behavior of 'temp-buffer-resize-mode' (Bug#81207)
* lisp/help.el (temp-buffer-resize-mode): Fix doc-string - a window can be resized now even if it has shown another buffer in between (Bug#81207). (resize-temp-buffer-window): Resize window if and only if its buffer is the buffer it has shown initially (Bug#81207).
This commit is contained in:
parent
927a7fff5e
commit
19a7d4ce7c
1 changed files with 6 additions and 5 deletions
|
|
@ -2003,10 +2003,8 @@ show a temporary buffer are automatically resized in height to
|
|||
fit the buffer's contents, but never more than
|
||||
`temp-buffer-max-height' nor less than `window-min-height'.
|
||||
|
||||
A window is resized only if it has been specially created for the
|
||||
buffer. Windows that have shown another buffer before are not
|
||||
resized. A frame is resized only if `fit-frame-to-buffer' is
|
||||
non-nil.
|
||||
A window is resized only if it has been specially created for its
|
||||
buffer. A frame is resized only if `fit-frame-to-buffer' is non-nil.
|
||||
|
||||
This mode is used by `help', `apropos' and `completion' buffers,
|
||||
and some others."
|
||||
|
|
@ -2050,6 +2048,9 @@ provided `fit-frame-to-buffer' is non-nil."
|
|||
(quit-cadr (cadr (window-parameter window 'quit-restore))))
|
||||
;; Resize WINDOW only if it was made by `display-buffer'.
|
||||
(when (or (and (eq quit-cadr 'window)
|
||||
;; When WINDOW was reused, its buffer must be the one
|
||||
;; initially shown in it (Bug#81207).
|
||||
(eq buffer (nth 3 (window-parameter window 'quit-restore)))
|
||||
(or (and (window-combined-p window)
|
||||
(not (eq fit-window-to-buffer-horizontally
|
||||
'only))
|
||||
|
|
|
|||
Loading…
Reference in a new issue