Skip to content

Commit 6cd4223

Browse files
authored
fix: Remove invasive split terminal action (#12358)
Contributed on behalf of STMicroelectronics
1 parent 11ade90 commit 6cd4223

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/terminal/src/browser/terminal-frontend-contribution.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,9 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
542542
execute: () => this.openActiveWorkspaceTerminal()
543543
});
544544
commands.registerCommand(TerminalCommands.SPLIT, {
545-
execute: () => this.splitTerminal()
545+
execute: () => this.splitTerminal(),
546+
isEnabled: () => this.shell.currentWidget instanceof TerminalWidget,
547+
isVisible: () => this.shell.currentWidget instanceof TerminalWidget,
546548
});
547549
commands.registerCommand(TerminalCommands.TERMINAL_CLEAR);
548550
commands.registerHandler(TerminalCommands.TERMINAL_CLEAR.id, {

0 commit comments

Comments
 (0)