Fix #1509: failure to resize certain popups
This commit is contained in:
parent
168c1d5e61
commit
26da625981
1 changed files with 8 additions and 16 deletions
|
@ -114,22 +114,14 @@ windows (unlike `doom/window-maximize-buffer') Activate again to undo."
|
||||||
(assq ?_ register-alist))
|
(assq ?_ register-alist))
|
||||||
(ignore (ignore-errors (jump-to-register ?_)))
|
(ignore (ignore-errors (jump-to-register ?_)))
|
||||||
(window-configuration-to-register ?_)
|
(window-configuration-to-register ?_)
|
||||||
(if (window-dedicated-p)
|
(let ((dedicated-p (window-dedicated-p)))
|
||||||
;; `window-resize' and `window-max-delta' don't respect
|
(unwind-protect
|
||||||
;; `ignore-window-parameters', so we gotta force it to.
|
(progn
|
||||||
(cl-letf* ((old-window-resize (symbol-function #'window-resize))
|
(when dedicated-p
|
||||||
(old-window-max-delta (symbol-function #'window-max-delta))
|
(set-window-dedicated-p nil nil))
|
||||||
((symbol-function #'window-resize)
|
|
||||||
(lambda (window delta &optional horizontal _ignore pixelwise)
|
|
||||||
(funcall old-window-resize window delta horizontal
|
|
||||||
t pixelwise)))
|
|
||||||
((symbol-function #'window-max-delta)
|
|
||||||
(lambda (&optional window horizontal _ignore trail noup nodown pixelwise)
|
|
||||||
(funcall old-window-max-delta window horizontal t
|
|
||||||
trail noup nodown pixelwise))))
|
|
||||||
(maximize-window))
|
(maximize-window))
|
||||||
(maximize-window))
|
(set-window-dedicated-p nil dedicated-p))
|
||||||
t)))
|
t))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/window-maximize-horizontally ()
|
(defun doom/window-maximize-horizontally ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue