Merge pull request #202270 from Ajaykumbhare/quickest-meerkat

fix: terminal renaming not functioning as expected in editor area
pull/202300/head
Megan Rogge 2024-01-11 15:28:27 -08:00 committed by GitHub
commit 24dfce5b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1902,7 +1902,9 @@ async function focusActiveTerminal(instance: ITerminalInstance, c: ITerminalServ
async function renameWithQuickPick(c: ITerminalServicesCollection, accessor: ServicesAccessor, resource?: unknown) {
let instance: ITerminalInstance | undefined = resource as ITerminalInstance;
if (!instance) {
// Check if the 'instance' does not exist or if 'instance.rename' is not defined
if (!instance || !instance?.rename) {
// If not, obtain the resource instance using 'getResourceOrActiveInstance'
instance = getResourceOrActiveInstance(c, resource);
}