Fix bugs in `with-displayed-buffer-window' and `fit-window-to-buffer'
authorMartin Rudalics <rudalics@gmx.at>
Sat, 15 Apr 2017 14:16:26 +0000 (16:16 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 15 Apr 2017 14:16:26 +0000 (16:16 +0200)
commit23d3eeb798c7edc27898b0dbd4c2364a6ca6247d
treea0b22ccde7f4652a4d1e1d1016b7dcb2b8e84dd7
parent28718c4449972640c39a7be1b62ccc7f50c6e801
Fix bugs in `with-displayed-buffer-window' and `fit-window-to-buffer'

* lisp/window.el (with-displayed-buffer-window): When a
'window-height' action alist entry specifies a function, call
`temp-buffer-window-show' with a '(window-height . t)' dummy
entry so `window--try-to-split-window' will bind
`window-combination-limit' to t and that function does not
resize any other window but the one we split this one off
(Bug#25055, Bug#25179).
(fit-window-to-buffer): Call `window-max-delta' with NOUP t so
we steal space only from windows in the same combination.
Stealing space from other windows would not allow us to return
that space later when this window is deleted (Bug#25055,
Bug#25179).
lisp/window.el