diff --git a/src/node/vscode.ts b/src/node/vscode.ts index d7a32983..efdd74ca 100644 --- a/src/node/vscode.ts +++ b/src/node/vscode.ts @@ -37,15 +37,19 @@ export class VscodeProvider { query: ipc.Query, ): Promise { const { lastVisited } = await settings.read() - const startPath = await this.getFirstPath([ + let startPath = await this.getFirstPath([ { url: query.workspace, workspace: true }, { url: query.folder, workspace: false }, options.args._ && options.args._.length > 0 ? { url: path.resolve(options.args._[options.args._.length - 1]) } : undefined, - !options.args["ignore-last-opened"] && !query.ew ? lastVisited : undefined, + !options.args["ignore-last-opened"] ? lastVisited : undefined, ]) + if (query.ew) { + startPath = undefined + } + settings.write({ lastVisited: startPath, query,