From 9680994d3a1a9d08a12927be4aacb8b631f6b046 Mon Sep 17 00:00:00 2001 From: martin rudalics Date: Mon, 6 Sep 2021 12:48:07 +0200 Subject: [PATCH] Restore the debugging window size more reliably * lisp/emacs-lisp/debug.el (debug): Restore the debugging window size more reliably (bug#12921). --- lisp/emacs-lisp/debug.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 2007f79634d..f76ae3fe69f 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -266,16 +266,15 @@ the debugger will not be entered." (window-frame debugger-previous-window))) `((previous-window . ,debugger-previous-window)))))) (setq debugger-window (selected-window)) - (if (eq debugger-previous-window debugger-window) - (when debugger-jumping-flag - ;; Try to restore previous height of debugger - ;; window. - (condition-case nil - (window-resize - debugger-window - (- debugger-previous-window-height - (window-total-height debugger-window))) - (error nil))) + (when debugger-jumping-flag + ;; Try to restore previous height of debugger + ;; window. + (condition-case nil + (window-resize + debugger-window + (- debugger-previous-window-height + (window-total-height debugger-window))) + (error nil)) (setq debugger-previous-window debugger-window)) (message "") (let ((standard-output nil) -- 2.39.2