From: Chong Yidong Date: Wed, 29 Oct 2008 21:42:37 +0000 (+0000) Subject: (Electric-pop-up-window): Don't shrink the window if it's already big X-Git-Tag: emacs-pretest-23.0.90~2094 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48238d1d4509e9cbd26beccc34abc76f37610771;p=emacs.git (Electric-pop-up-window): Don't shrink the window if it's already big enough. --- diff --git a/lisp/electric.el b/lisp/electric.el index 60a551291a7..289b6ecd147 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -153,8 +153,10 @@ (setq win (selected-window))) (t (switch-to-buffer buf))) - (fit-window-to-buffer win max-height) + ;; Don't shrink the window, but expand it if necessary. (goto-char (point-min)) + (unless (= (point-max) (window-end win)) + (fit-window-to-buffer win max-height)) win))) (provide 'electric)