Skip to content

Commit d179317

Browse files
committed
chore: better multi terminal UX
1 parent 9c07157 commit d179317

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

  • src/extensionsIntegrated/Terminal

src/extensionsIntegrated/Terminal/main.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,23 @@ define(function (require, exports, module) {
150150
_hideShellDropdown();
151151
ShellProfiles.setDefaultShell(shell.name);
152152
_populateShellDropdown();
153+
_updateNewTerminalButtonLabel();
154+
_createNewTerminalWithShell(shell);
153155
});
154156
$shellDropdown.append($item);
155157
}
156158
}
157159

160+
/**
161+
* Update the "+ New Terminal" button label to show the default shell name
162+
*/
163+
function _updateNewTerminalButtonLabel() {
164+
const defaultShell = ShellProfiles.getDefaultShell();
165+
const label = defaultShell ? defaultShell.name : "New Terminal";
166+
$panel.find(".terminal-new-btn-label").text(label);
167+
$panel.find(".terminal-flyout-new-btn").attr("title", label);
168+
}
169+
158170
/**
159171
* Show/hide the shell dropdown
160172
*/
@@ -553,6 +565,7 @@ define(function (require, exports, module) {
553565
$panel.find(".terminal-flyout-dropdown-btn").addClass("forced-hidden");
554566
}
555567
_populateShellDropdown();
568+
_updateNewTerminalButtonLabel();
556569
});
557570

558571
// Clean up on window unload

0 commit comments

Comments
 (0)