Skip to content

Commit

Permalink
additionals, stdin で指定されたファイルが閉じられた時のエラーハンドリングが正常に機能しなくなっていたので修正
Browse files Browse the repository at this point in the history
  • Loading branch information
wraith13 committed Feb 28, 2017
1 parent 535ce17 commit 6c3c40c
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,20 @@ module WandboxVSCode
{
export function IsOpenFiles(files : string[]) : boolean
{
return files.filter
var notFoundFiles = files.filter
(
file => vscode.workspace.textDocuments
.filter(document => file === document.fileName)
.length <= 0
)
.map
);
notFoundFiles.forEach
(
file => OutputChannel.appendLine
(
`${emoji("error")}Not found file: ${file} ( If opened, show this file once. And keep to open it.)`
)
)
.length <= 0;
);
return notFoundFiles.length <= 0;
}

export function getActiveDocument() :vscode.TextDocument
Expand Down Expand Up @@ -924,6 +924,19 @@ module WandboxVSCode
}
)
);
additionals
.filter(i => 0 === fileList.filter(item => i === item.description).length)
.forEach
(
fileName => fileList.push
(
{
label: emoji("checkedBox") +stripDirectory(fileName),
description: fileName,
detail: `${emoji("error")}Not found file ( If opened, show this file once. And keep to open it.)`
}
)
);
fileList.push
(
{
Expand Down Expand Up @@ -994,6 +1007,17 @@ module WandboxVSCode
}
)
);
if (stdin && 0 === fileList.filter(item => stdin === item.description).length)
{
fileList.push
(
{
label: emoji("checkedRadio") +stripDirectory(stdin),
description: stdin,
detail: `${emoji("error")}Not found file ( If opened, show this file once. And keep to open it.)`
}
);
}
let newUntitledDocument : vscode.QuickPickItem =
{
label: `${emoji("new")}new untitled document`,
Expand Down

0 comments on commit 6c3c40c

Please sign in to comment.