From 6317fa043594580e84219764c823cc1542ad3d72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 26 Jun 2019 23:06:46 +0200 Subject: [PATCH] Fix #1509: failure to resize certain popups (part 2) doom/window-enlargen would fail silently for windows with a preserved size (e.g. all ui/popup popup windows) --- core/autoload/ui.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 5825e902f..53ad06409 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -114,13 +114,20 @@ windows (unlike `doom/window-maximize-buffer') Activate again to undo." (assq ?_ register-alist)) (ignore (ignore-errors (jump-to-register ?_))) (window-configuration-to-register ?_) - (let ((dedicated-p (window-dedicated-p))) + (let* ((window (selected-window)) + (dedicated-p (window-dedicated-p window)) + (preserved-p (window-parameter window 'window-preserved-size)) + (ignore-window-parameters t)) (unwind-protect (progn (when dedicated-p - (set-window-dedicated-p nil nil)) - (maximize-window)) - (set-window-dedicated-p nil dedicated-p)) + (set-window-dedicated-p window nil)) + (when preserved-p + (set-window-parameter window 'window-preserved-size nil)) + (maximize-window window)) + (set-window-dedicated-p window dedicated-p) + (when preserved-p + (set-window-parameter window 'window-preserved-size preserved-p))) t)))) ;;;###autoload