Skip to content

Commit

Permalink
Fix single terminal tab rename action does not work (#201128)
Browse files Browse the repository at this point in the history
Fixes #201025
  • Loading branch information
jeanp413 authored Dec 18, 2023
1 parent 0ad1502 commit 12bb20c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,12 +854,18 @@ export function registerTerminalActions() {
},
precondition: sharedWhenClause.terminalAvailable_and_singularSelection,
run: async (c, accessor) => {
const terminalGroupService = accessor.get(ITerminalGroupService);
const notificationService = accessor.get(INotificationService);
const instances = getSelectedInstances(accessor);
const firstInstance = instances?.[0];
if (!firstInstance) {
return;
}

if (terminalGroupService.lastAccessedMenu === 'inline-tab') {
return renameWithQuickPick(c, accessor, firstInstance);
}

c.service.setEditingTerminal(firstInstance);
c.service.setEditable(firstInstance, {
validationMessage: value => validateTerminalName(value),
Expand Down

0 comments on commit 12bb20c

Please sign in to comment.