1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-29 15:05:46 +01:00

Fix some args parsing bugs.

--HG--
extra : rebase_source : 1860f8e4e3dd69f26009c704626f41e668ae7e9f
This commit is contained in:
Kris Maglione
2010-10-01 13:25:10 -04:00
parent 572c591979
commit 21514370da
2 changed files with 18 additions and 13 deletions

View File

@@ -60,7 +60,7 @@ const CompletionContext = Class("CompletionContext", {
self.__defineGetter__("value", function () this.top.value);
self.offset = parent.offset;
self.advance(offset);
self.advance(offset || 0);
/**
* @property {boolean} Specifies that this context is not finished
@@ -449,9 +449,9 @@ const CompletionContext = Class("CompletionContext", {
this.cache.constructed = items.map(function (item) Object.create(proto, { item: { value: item, enumerable: true } }));
// Filters
let filtered = this.filterFunc(this.cache.constructed);
if (this.maxItems)
filtered = filtered.slice(0, this.maxItems);
let filtered = this.filterFunc(this.cache.constructed);
if (this.maxItems)
filtered = filtered.slice(0, this.maxItems);
// Sorting
if (this.sortResults && this.compare)