提交 348c77dc 编写于 作者: D Daniel Imms

Fix --new-window-if-not-first

The setting will now correctly open a new window when no file is specified, but if
a file is specified it will reuse. This is so opening via the file manager will reuse
the window.

Fixes #19775
上级 4ebb8a2f
......@@ -94,7 +94,7 @@ export class LaunchService implements ILaunchService {
let usedWindows: VSCodeWindow[];
if (!!args.extensionDevelopmentPath) {
this.windowsService.openExtensionDevelopmentHostWindow({ context, cli: args, userEnv });
} else if (args._.length === 0 && args['new-window']) {
} else if (args._.length === 0 && (args['new-window'] || args['new-window-if-not-first'])) {
usedWindows = this.windowsService.open({ context, cli: args, userEnv, forceNewWindow: true, forceEmpty: true });
} else if (args._.length === 0) {
usedWindows = [this.windowsService.focusLastActive(args, context)];
......@@ -103,7 +103,7 @@ export class LaunchService implements ILaunchService {
context,
cli: args,
userEnv,
forceNewWindow: args.wait || args['new-window'] || args['new-window-if-not-first'],
forceNewWindow: args.wait || args['new-window'],
preferNewWindow: !args['reuse-window'],
forceReuseWindow: args['reuse-window'],
diffMode: args.diff
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册