File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
addons/explorer/src/renderer Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ const target = $computed(() => {
27
27
if (! tab .group ) return undefined
28
28
const siblings = commas .workspace .getTerminalTabsByGroup (tab .group )
29
29
.filter (item => item !== tab )
30
- if (siblings .length === 1 ) return siblings [0 ]
30
+ const teletypes = siblings .filter (item => ! item .pane )
31
+ if (teletypes .length === 1 ) return teletypes [0 ]
31
32
})
32
33
33
34
const isConnected = $computed (() => {
Original file line number Diff line number Diff line change @@ -39,11 +39,17 @@ export function splitOrCloseFileExplorerTab(directory: string) {
39
39
}
40
40
const titlePosition = settings [ 'terminal.view.tabListPosition' ] === 'top' ? 'bottom' : 'top'
41
41
const tab = openFileExplorerTab ( directory )
42
- if ( current && ! current . pane && ! current . group ) {
43
- commas . workspace . appendTerminalTab (
44
- current ,
45
- commas . workspace . getTerminalTabIndex ( tab ) ,
46
- titlePosition ,
47
- )
42
+ if ( current && ! current . pane ) {
43
+ const siblings = current . group
44
+ ? commas . workspace . getTerminalTabsByGroup ( tab . group )
45
+ . filter ( item => item !== current )
46
+ : [ ]
47
+ if ( siblings . every ( item => item . pane ) ) {
48
+ commas . workspace . appendTerminalTab (
49
+ current ,
50
+ commas . workspace . getTerminalTabIndex ( tab ) ,
51
+ titlePosition ,
52
+ )
53
+ }
48
54
}
49
55
}
You can’t perform that action at this time.
0 commit comments