Skip to content

Commit 2615c30

Browse files
sivcanJakob Werner
authored andcommitted
Added support for extending limit for quick filter through configuration (#26)
* Added support for extending limit for quick filter through configuration * Version change
1 parent b50ee15 commit 2615c30

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "RelativePath",
33
"description": "Get relative url paths from files in the current workspace.",
4-
"version": "1.3.0",
4+
"version": "1.4.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/jakob101/RelativePath"

src/extension.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,18 @@ class RelativePath {
240240
return;
241241
}
242242

243+
let extendedLimit = this._configuration.extendedLimit,
244+
disableQuickFilter = true;
245+
246+
if (extendedLimit && this._items.length <= extendedLimit) {
247+
disableQuickFilter = false;
248+
}
249+
else if (this._items.length <= 1000) {
250+
disableQuickFilter = false;
251+
}
252+
243253
// Don't filter on too many files. Show the input search box instead
244-
if (this._items.length > 1000) {
254+
if (disableQuickFilter) {
245255
const placeHolder = `Found ${this._items.length} files. Enter the filter query. Consider adding more 'relativePath.ignore' settings.`;
246256
const input = window.showInputBox({placeHolder});
247257
input.then(val => {

0 commit comments

Comments
 (0)