summaryrefslogtreecommitdiff
path: root/lisp/electric.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-10-29 21:42:37 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-10-29 21:42:37 +0000
commit48238d1d4509e9cbd26beccc34abc76f37610771 (patch)
tree24b42c2a7e1d2cb2d6b49ca874a629fee8272aaa /lisp/electric.el
parentbb07cb70dd8ae8c581245058b375256323897026 (diff)
(Electric-pop-up-window): Don't shrink the window if it's already big
enough.
Diffstat (limited to 'lisp/electric.el')
-rw-r--r--lisp/electric.el4
1 files changed, 3 insertions, 1 deletions
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)