File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -939,7 +939,6 @@ impl TerminalPanel {
939939 cx : & mut Context < Self > ,
940940 ) -> Task < Result < WeakEntity < Terminal > > > {
941941 let reveal = spawn_task. reveal ;
942- let reveal_target = spawn_task. reveal_target ;
943942 let task_workspace = self . workspace . clone ( ) ;
944943 cx. spawn_in ( window, async move |terminal_panel, cx| {
945944 let project = terminal_panel. update ( cx, |this, cx| {
@@ -955,6 +954,14 @@ impl TerminalPanel {
955954 terminal_to_replace. set_terminal ( new_terminal. clone ( ) , window, cx) ;
956955 } ) ?;
957956
957+ let reveal_target = terminal_panel. update ( cx, |panel, _| {
958+ if panel. center . panes ( ) . iter ( ) . any ( |p| * * p == task_pane) {
959+ RevealTarget :: Dock
960+ } else {
961+ RevealTarget :: Center
962+ }
963+ } ) ?;
964+
958965 match reveal {
959966 RevealStrategy :: Always => match reveal_target {
960967 RevealTarget :: Center => {
You can’t perform that action at this time.
0 commit comments