aboutsummaryrefslogtreecommitdiff
path: root/perspective.el
diff options
context:
space:
mode:
authorConstantine Vetoshev <gepardcv@gmail.com>2021-09-19 20:44:52 -0700
committerConstantine Vetoshev <gepardcv@gmail.com>2021-09-19 20:45:10 -0700
commitacad4fb2cfe27feb0ecbe07e51c364bfa5ea4f47 (patch)
treed9250c1e626e0f8d66a762db2bcf277be5aebf2f /perspective.el
parent53348cea0f46655c4c072da5984f6a652726df4f (diff)
Add workaround for potential recursive minibuffer problems.
Diffstat (limited to 'perspective.el')
-rw-r--r--perspective.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/perspective.el b/perspective.el
index 7aad3e4..cc7be51 100644
--- a/perspective.el
+++ b/perspective.el
@@ -665,6 +665,11 @@ perspective's local variables are set.
If NORECORD is non-nil, do not update the
`persp-last-switch-time' for the switched perspective."
(interactive "i")
+ ;; TODO: See https://github.com/nex3/perspective-el/issues/163 for the source
+ ;; of this workaround. It would be good to investigate exactly why recursive
+ ;; minibuffers break Perspective.
+ (when (> (minibuffer-depth) 0)
+ (user-error "Perspective operations in recursive minibuffers not supported"))
(unless (persp-valid-name-p name)
(setq name (persp-prompt (and (persp-last) (persp-name (persp-last))))))
(if (and (persp-curr) (equal name (persp-current-name))) name