vscode.ts: Fix close current folder
Fixes VscodeProvider to correctly obey the ew parameter. Based on changes by @rdbeach. See the previous commit.
This commit is contained in:
parent
28c7340608
commit
d234ddc1e1
@ -37,15 +37,19 @@ export class VscodeProvider {
|
|||||||
query: ipc.Query,
|
query: ipc.Query,
|
||||||
): Promise<ipc.WorkbenchOptions> {
|
): Promise<ipc.WorkbenchOptions> {
|
||||||
const { lastVisited } = await settings.read()
|
const { lastVisited } = await settings.read()
|
||||||
const startPath = await this.getFirstPath([
|
let startPath = await this.getFirstPath([
|
||||||
{ url: query.workspace, workspace: true },
|
{ url: query.workspace, workspace: true },
|
||||||
{ url: query.folder, workspace: false },
|
{ url: query.folder, workspace: false },
|
||||||
options.args._ && options.args._.length > 0
|
options.args._ && options.args._.length > 0
|
||||||
? { url: path.resolve(options.args._[options.args._.length - 1]) }
|
? { url: path.resolve(options.args._[options.args._.length - 1]) }
|
||||||
: undefined,
|
: undefined,
|
||||||
!options.args["ignore-last-opened"] && !query.ew ? lastVisited : undefined,
|
!options.args["ignore-last-opened"] ? lastVisited : undefined,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if (query.ew) {
|
||||||
|
startPath = undefined
|
||||||
|
}
|
||||||
|
|
||||||
settings.write({
|
settings.write({
|
||||||
lastVisited: startPath,
|
lastVisited: startPath,
|
||||||
query,
|
query,
|
||||||
|
Reference in New Issue
Block a user