ui/workspaces: don't persist TRAMP buffers
They're too slow to restore.
This commit is contained in:
parent
03162466c6
commit
08e5b8535a
1 changed files with 9 additions and 4 deletions
|
@ -195,10 +195,15 @@ stored in `persp-save-dir'.")
|
|||
(defun +workspaces-delete-all-posframes-h (&rest _)
|
||||
(posframe-delete-all))))
|
||||
|
||||
;; Fix #1525: Ignore dead buffers in PERSP's buffer list
|
||||
(defun +workspaces-dead-buffer-p (buf)
|
||||
(not (buffer-live-p buf)))
|
||||
(add-hook 'persp-filter-save-buffers-functions #'+workspaces-dead-buffer-p)
|
||||
|
||||
(add-hook! 'persp-filter-save-buffers-functions
|
||||
(defun +workspaces-dead-buffer-p (buf)
|
||||
;; Fix #1525: Ignore dead buffers in PERSP's buffer list
|
||||
(not (buffer-live-p buf)))
|
||||
(defun +workspaces-remote-buffer-p (buf)
|
||||
;; And don't save TRAMP buffers; they're super slow to restore
|
||||
(let ((dir (buffer-local-value 'default-directory buf)))
|
||||
(ignore-errors (file-remote-p dir)))))
|
||||
|
||||
;; Otherwise, buffers opened via bookmarks aren't treated as "real" and are
|
||||
;; excluded from the buffer list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue