mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-28 10:56:36 +00:00
(fit-window-to-buffer): Fix previous change.
This commit is contained in:
parent
b1491763bb
commit
edb08287fb
@ -500,13 +500,11 @@ header-line."
|
|||||||
(1- (point))
|
(1- (point))
|
||||||
(point))))))
|
(point))))))
|
||||||
(set-window-vscroll window 0)
|
(set-window-vscroll window 0)
|
||||||
(prog1
|
|
||||||
(list desired-height max-height)
|
|
||||||
(while (and (< desired-height max-height)
|
(while (and (< desired-height max-height)
|
||||||
(= desired-height (window-height window))
|
(= desired-height (window-height window))
|
||||||
(not (pos-visible-in-window-p end window t)))
|
(not (pos-visible-in-window-p end window t)))
|
||||||
(enlarge-window 1)
|
(enlarge-window 1)
|
||||||
(setq desired-height (1+ desired-height))))))))
|
(setq desired-height (1+ desired-height)))))))
|
||||||
|
|
||||||
(defun shrink-window-if-larger-than-buffer (&optional window)
|
(defun shrink-window-if-larger-than-buffer (&optional window)
|
||||||
"Shrink the WINDOW to be as small as possible to display its contents.
|
"Shrink the WINDOW to be as small as possible to display its contents.
|
||||||
|
Loading…
Reference in New Issue
Block a user