Skip to content

Commit

Permalink
fix #131571
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed Aug 24, 2021
1 parent 4cd3ec8 commit e880f7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/workbench/api/common/extHostTerminalService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,14 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
}

private _resolveLocation(location?: TerminalLocation | vscode.TerminalEditorLocationOptions | vscode.TerminalSplitLocationOptions): undefined | TerminalLocation | vscode.TerminalEditorLocationOptions {
if (typeof location === 'object' && 'parentTerminal' in location) {
if (typeof location === 'object' && 'viewColumn' in location && location.viewColumn !== undefined) {
return { viewColumn: location.viewColumn, preserveFocus: location.preserveFocus };
} else if (typeof location === 'object' && 'parentTerminal' in location) {
// parent terminal exthost ID is passed in internal options
// for conversion to TerminalInstance in mainThreadTerminalService
return undefined;
} else if (location === TerminalLocation.Editor || location === TerminalLocation.Panel) {
return location;
}
return location;
}
Expand Down

0 comments on commit e880f7e

Please sign in to comment.