aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine Vetoshev <gepardcv@gmail.com>2021-11-01 20:55:58 -0700
committerConstantine Vetoshev <gepardcv@gmail.com>2021-11-01 20:55:58 -0700
commit6e87eeb6160345390406a82af0db61782bfb9913 (patch)
tree9ff76aead2e9c54715fe6a28a3c6253803c5748f
parent520b038b9d8d993fd5e2cf082439744d4de5cf57 (diff)
Working on a real fix to #163 and #167.
-rw-r--r--perspective.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/perspective.el b/perspective.el
index db7a41d..6861e30 100644
--- a/perspective.el
+++ b/perspective.el
@@ -564,7 +564,12 @@ window-side creating perspectives."
;; side effect when `persp-reactivate-buffers' is called and
;; the perspective is then switched.
(switch-to-buffer-preserve-window-point nil))
- (delete-other-windows)
+ (delete-other-windows
+ ;; XXX: Ugly workaround for problems related to
+ ;; https://github.com/nex3/perspective-el/issues/163 and
+ ;; https://github.com/nex3/perspective-el/issues/167
+ (when (eq (minibuffer-window) (selected-window))
+ (previous-window (minibuffer-window))))
(when (ignore-errors
;; Create a fresh window without any window parameters, the
;; selected window is still in a window that may have window
@@ -703,11 +708,6 @@ 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 (> (recursion-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