Commit 21321fe1 authored by Troels Henriksen's avatar Troels Henriksen

Added `switch-to-pane' restart for (setf view).

parent 309d3db0
......@@ -116,6 +116,10 @@ window"))
(window-displaying-view
(restart-case
(error 'view-already-displayed :view view :window window-displaying-view)
(switch-to-pane ()
:report "Switch the active window to the one containing the view"
(other-window window-displaying-view)
view)
(remove-other-use ()
:report "Make the other window try to display some other view"
(setf (view window-displaying-view) (any-preferably-undisplayed-view))
......@@ -129,7 +133,7 @@ window"))
(setf (view pane) (clone-view-for-climacs
(pane-frame window-displaying-view) view)))
(cancel ()
:report "Cancel the setting of the windows view and just return")))
:report "Cancel the setting of the windows view and just return nil")))
(t (call-next-method)))
(when old-view-active
(ensure-only-view-active (pane-frame pane) view)))))
......
......@@ -47,7 +47,7 @@
#:view-setting-error #:view
#:unknown-view
#:view-already-displayed #:window
#:remove-other-use #:remove-other-pane #:clone-view #:cancel
#:switch-to-pane #:remove-other-use #:remove-other-pane #:clone-view #:cancel
#:any-view #:any-undisplayed-view
#:clone-view-for-climacs
#:make-new-view-for-climacs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment