Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

Commit f7e4d6b

Browse files
committed
minor fixes
1 parent f2511c3 commit f7e4d6b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vs-script-commands",
33
"displayName": "Script Commands",
44
"description": "Adds additional commands to Visual Studio Code that uses scripts (JavaScript) for execution.",
5-
"version": "4.9.0",
5+
"version": "4.9.1",
66
"publisher": "mkloubert",
77
"engines": {
88
"vscode": "^1.6.0"

src/controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ export class ScriptCommandController extends Events.EventEmitter implements vsco
773773
ignore = sc_helpers.asArray(ignore)
774774
.map(x => sc_helpers.toStringSafe(x))
775775
.filter(x => '' !== x.trim());
776+
ignore = sc_helpers.distinctArray(ignore);
776777

777778
Glob(pattern, <any>{
778779
cwd: vscode.workspace.rootPath,

src/quick.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ export function quickExecution() {
563563
ignore = sc_helpers.asArray(ignore)
564564
.map(x => sc_helpers.toStringSafe(x))
565565
.filter(x => '' !== x.trim());
566+
ignore = sc_helpers.distinctArray(ignore);
566567

567568
return Glob.sync(pattern, <any>{
568569
cwd: _currentDir,
@@ -648,7 +649,8 @@ export function quickExecution() {
648649
minOrMax = MAX_RAND;
649650
}
650651

651-
return RandomInt(0, minOrMax);
652+
return RandomInt(minOrMax >= 0 ? 0 : MIN_RAND,
653+
minOrMax);
652654
}
653655

654656
max = parseInt(sc_helpers.toStringSafe(max).trim());

0 commit comments

Comments
 (0)