mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 13:03:42 +01:00
:polish: prefer to open file in same window if triggered from integrated terminal
This commit is contained in:
@@ -1149,9 +1149,10 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
||||
}
|
||||
}
|
||||
|
||||
// Linux/Windows: by default we open files in the new window unless triggered via DIALOG or MENU context
|
||||
// Linux/Windows: by default we open files in the new window unless triggered via DIALOG / MENU context
|
||||
// or from the integrated terminal where we assume the user prefers to open in the current window
|
||||
else {
|
||||
if (openConfig.context !== OpenContext.DIALOG && openConfig.context !== OpenContext.MENU) {
|
||||
if (openConfig.context !== OpenContext.DIALOG && openConfig.context !== OpenContext.MENU && !(openConfig.userEnv && openConfig.userEnv['TERM_PROGRAM'] === 'vscode')) {
|
||||
openFilesInNewWindow = true;
|
||||
}
|
||||
}
|
||||
@@ -2116,4 +2117,4 @@ function resourceFromURIToOpen(u: IURIToOpen): URI {
|
||||
}
|
||||
|
||||
return u.fileUri;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user