]> git.eshelyaron.com Git - emacs.git/commitdiff
(Electric-pop-up-window): Don't shrink the window if it's already big
authorChong Yidong <cyd@stupidchicken.com>
Wed, 29 Oct 2008 21:42:37 +0000 (21:42 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 29 Oct 2008 21:42:37 +0000 (21:42 +0000)
enough.

lisp/electric.el

index 60a551291a736f95c71cc8d43d14e8a709724ca6..289b6ecd147182dc7929bdf695bbb3fc98a56e43 100644 (file)
             (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)