From 48238d1d4509e9cbd26beccc34abc76f37610771 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 29 Oct 2008 21:42:37 +0000 Subject: [PATCH] (Electric-pop-up-window): Don't shrink the window if it's already big enough. --- lisp/electric.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.2