fix(workspaces): don't overwrite previously workspaces on save

Otherwise, each time `+workspace-save` is called, all prior saved
workspaces would be deleted from `+workspaces-data-file` before
inserting the new one.
This commit is contained in:
Chenty 2024-08-23 00:20:17 +08:00 committed by GitHub
parent dbcd30820b
commit b835e7b6ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ Returns t on success, nil otherwise."
(unless (+workspace-exists-p name)
(error "'%s' is an invalid workspace" name))
(let ((fname (expand-file-name +workspaces-data-file persp-save-dir)))
(persp-save-to-file-by-names fname *persp-hash* (list name))
(persp-save-to-file-by-names fname *persp-hash* (list name) t)
(and (member name (persp-list-persp-names-in-file fname))
t)))