fix(workspaces): dual *Warnings* windows at startup

At some point, either Emacs, persp-mode, or I fixed what caused #319,
which swallows the *Warnings* popup when the new main workspace is
created. Until I can determine what fixed it (so I can determine whether
the whole hack should go), I'll simply add this guard.

Ref: #319
This commit is contained in:
Henrik Lissner 2024-04-06 12:43:28 -04:00 committed by Yann Esposito (Yogsototh)
parent 9c4a4cf058
commit 88d4f49356
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -84,9 +84,10 @@ stored in `persp-save-dir'.")
;; HACK Fix #319: the warnings buffer gets swallowed when creating ;; HACK Fix #319: the warnings buffer gets swallowed when creating
;; `+workspaces-main', so display it ourselves, if it exists. ;; `+workspaces-main', so display it ourselves, if it exists.
(when-let (warnings (get-buffer "*Warnings*")) (when-let (warnings (get-buffer "*Warnings*"))
(unless (get-buffer-window warnings)
(save-excursion (save-excursion
(display-buffer-in-side-window (display-buffer-in-side-window
warnings '((window-height . shrink-window-if-larger-than-buffer)))))))) warnings '((window-height . shrink-window-if-larger-than-buffer)))))))))
(defun +workspaces-init-persp-mode-h () (defun +workspaces-init-persp-mode-h ()
(cond (persp-mode (cond (persp-mode
;; `uniquify' breaks persp-mode. It renames old buffers, which causes ;; `uniquify' breaks persp-mode. It renames old buffers, which causes