Skip to content

Commit d234ddc

Browse files
committed
vscode.ts: Fix close current folder
Fixes VscodeProvider to correctly obey the ew parameter. Based on changes by @rdbeach. See the previous commit.
1 parent 28c7340 commit d234ddc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/node/vscode.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,19 @@ export class VscodeProvider {
3737
query: ipc.Query,
3838
): Promise<ipc.WorkbenchOptions> {
3939
const { lastVisited } = await settings.read()
40-
const startPath = await this.getFirstPath([
40+
let startPath = await this.getFirstPath([
4141
{ url: query.workspace, workspace: true },
4242
{ url: query.folder, workspace: false },
4343
options.args._ && options.args._.length > 0
4444
? { url: path.resolve(options.args._[options.args._.length - 1]) }
4545
: undefined,
46-
!options.args["ignore-last-opened"] && !query.ew ? lastVisited : undefined,
46+
!options.args["ignore-last-opened"] ? lastVisited : undefined,
4747
])
4848

49+
if (query.ew) {
50+
startPath = undefined
51+
}
52+
4953
settings.write({
5054
lastVisited: startPath,
5155
query,

0 commit comments

Comments
 (0)