Skip to content

Commit

Permalink
Merge pull request coder#2596 from cdr/rdbeach
Browse files Browse the repository at this point in the history
vscode.ts: Fix close current folder
  • Loading branch information
nhooyr authored Jan 20, 2021
2 parents 3394ece + d234ddc commit c17f3ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/node/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class VscodeProvider {
query: ipc.Query,
): Promise<ipc.WorkbenchOptions> {
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
Expand All @@ -46,6 +46,10 @@ export class VscodeProvider {
!options.args["ignore-last-opened"] ? lastVisited : undefined,
])

if (query.ew) {
startPath = undefined
}

settings.write({
lastVisited: startPath,
query,
Expand Down

0 comments on commit c17f3ff

Please sign in to comment.