# HG changeset patch # User Chong Yidong # Date 1225316557 0 # Node ID 770ae8d8f7f433f65368972064860f41a159cfaa # Parent 49f2f7ce975f0733a2fbdc1e19e5d0bc159df1df (Electric-pop-up-window): Don't shrink the window if it's already big enough. diff -r 49f2f7ce975f -r 770ae8d8f7f4 lisp/electric.el --- a/lisp/electric.el Wed Oct 29 21:42:28 2008 +0000 +++ b/lisp/electric.el Wed Oct 29 21:42:37 2008 +0000 @@ -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)