cli: reuse window for add

This commit is contained in:
Martin Aeschlimann
2019-04-16 11:39:49 +02:00
parent e146527fec
commit 016921a4d2

View File

@@ -29,7 +29,7 @@ export interface StatusPipeArgs {
export interface RunCommandPipeArgs {
type: 'command';
command: string;
args: string[];
args: any[];
}
export class CLIServer {
@@ -99,7 +99,9 @@ export class CLIServer {
for (const s of folderURIs) {
try {
urisToOpen.push({ folderUri: URI.parse(s) });
forceNewWindow = true;
if (!addMode && !forceReuseWindow) {
forceNewWindow = true;
}
} catch (e) {
// ignore
}
@@ -110,7 +112,9 @@ export class CLIServer {
try {
if (hasWorkspaceFileExtension(s)) {
urisToOpen.push({ workspaceUri: URI.parse(s) });
forceNewWindow = true;
if (!forceReuseWindow) {
forceNewWindow = true;
}
} else {
urisToOpen.push({ fileUri: URI.parse(s) });
}