mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 02:32:35 -05:00
Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)
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;
|
||||
}
|
||||
}
|
||||
@@ -1255,10 +1256,9 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
||||
openConfig.cli['file-uri'] = fileUris;
|
||||
|
||||
// if there are no files or folders cli args left, use the "remote" cli argument
|
||||
if (!cliArgs.length && !folderUris.length && !fileUris.length) {
|
||||
if (authority) {
|
||||
openConfig.cli.remote = authority;
|
||||
}
|
||||
const noFilesOrFolders = !cliArgs.length && !folderUris.length && !fileUris.length;
|
||||
if (noFilesOrFolders && authority) {
|
||||
openConfig.cli.remote = authority;
|
||||
}
|
||||
|
||||
// Open it
|
||||
@@ -1266,7 +1266,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
||||
context: openConfig.context,
|
||||
cli: openConfig.cli,
|
||||
forceNewWindow: true,
|
||||
forceEmpty: !cliArgs.length && !folderUris.length && !fileUris.length,
|
||||
forceEmpty: noFilesOrFolders,
|
||||
userEnv: openConfig.userEnv,
|
||||
noRecentEntry: true,
|
||||
waitMarkerFileURI: openConfig.waitMarkerFileURI
|
||||
@@ -2116,4 +2116,4 @@ function resourceFromURIToOpen(u: IURIToOpen): URI {
|
||||
}
|
||||
|
||||
return u.fileUri;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user