From 88d4f493566d7a0ddec73ae600c0d4215faf5589 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 6 Apr 2024 12:43:28 -0400 Subject: [PATCH] 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 --- modules/ui/workspaces/config.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index 0fb223bf2..540c76977 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -84,9 +84,10 @@ stored in `persp-save-dir'.") ;; HACK Fix #319: the warnings buffer gets swallowed when creating ;; `+workspaces-main', so display it ourselves, if it exists. (when-let (warnings (get-buffer "*Warnings*")) - (save-excursion - (display-buffer-in-side-window - warnings '((window-height . shrink-window-if-larger-than-buffer)))))))) + (unless (get-buffer-window warnings) + (save-excursion + (display-buffer-in-side-window + warnings '((window-height . shrink-window-if-larger-than-buffer))))))))) (defun +workspaces-init-persp-mode-h () (cond (persp-mode ;; `uniquify' breaks persp-mode. It renames old buffers, which causes