Remove core-popup coupling
New popup management system coming soon!
This commit is contained in:
parent
e0c8e6daef
commit
8e7b822062
3 changed files with 11 additions and 14 deletions
|
@ -105,9 +105,7 @@ If DERIVED-P, test with `derived-mode-p', otherwise use `eq'."
|
|||
;;;###autoload
|
||||
(defun doom-visible-windows (&optional window-list)
|
||||
"Return a list of the visible, non-popup windows."
|
||||
(cl-loop for win in (or window-list (window-list))
|
||||
unless (doom-popup-p win)
|
||||
collect win))
|
||||
(cl-remove-if #'window-at-side-p (or window-list (window-list))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-visible-buffers (&optional buffer-list)
|
||||
|
|
|
@ -405,16 +405,15 @@ end of the workspace list."
|
|||
"Close the selected window. If it's the last window in the workspace, close
|
||||
the workspace and move to the next."
|
||||
(interactive)
|
||||
(if (doom-popup-p)
|
||||
(doom/popup-close)
|
||||
(let ((delete-window-fn (if (featurep 'evil) #'evil-window-delete #'delete-window)))
|
||||
(if (window-at-side-p)
|
||||
(funcall delete-window-fn)
|
||||
(let ((current-persp-name (+workspace-current-name)))
|
||||
(cond ((or (+workspace--protected-p current-persp-name)
|
||||
(> (length (doom-visible-windows)) 1))
|
||||
(if (bound-and-true-p evil-mode)
|
||||
(evil-window-delete)
|
||||
(delete-window)))
|
||||
((> (length (+workspace-list-names)) 1)
|
||||
(+workspace/delete current-persp-name))))))
|
||||
(cdr (doom-visible-windows)))
|
||||
(funcall delete-window-fn))
|
||||
((cdr (+workspace-list-names))
|
||||
(+workspace/delete current-persp-name)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/close-workspace-or-frame ()
|
||||
|
|
|
@ -30,6 +30,6 @@ to a pop up buffer."
|
|||
(setq lines (count-lines (point-min) (point-max)))
|
||||
(goto-char (point-min))
|
||||
(if (> lines 1)
|
||||
(doom-popup-buffer buf)
|
||||
(pop-to-buffer buf t)
|
||||
(message "%s" (buffer-substring (point-min) (point-max)))
|
||||
(kill-buffer buf)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue