diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-10-11 14:48:03 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-10-11 14:48:03 -0400 |
commit | 0a2750c7edb993c617b54caca5b77d926db38832 (patch) | |
tree | 0b24e634901091c0edf63d8487df0257c149aee4 /common/content/commandline.js | |
parent | a0fc10efbc01bba49d187788b66e8345713a1f63 (diff) | |
download | pentadactyl-0a2750c7edb993c617b54caca5b77d926db38832.tar.gz |
Speed up hint opening a bit.
Diffstat (limited to 'common/content/commandline.js')
-rw-r--r-- | common/content/commandline.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/content/commandline.js b/common/content/commandline.js index 8de0d395..8d23dc27 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -1272,7 +1272,6 @@ const CommandLine = Module("commandline", { this.wildtypes = this.wildmode.value; this.itemList = commandline._completionList; this.itemList.setItems(this.context); - this.reset(); }, UP: {}, @@ -1901,10 +1900,11 @@ const ItemList = Class("ItemList", { show: function show() { this._container.collapsed = false; }, visible: function visible() !this._container.collapsed, - reset: function () { + reset: function (brief) { this._startIndex = this._endIndex = this._selIndex = -1; this._div = null; - this.selectItem(-1); + if (!brief) + this.selectItem(-1); }, // if @param selectedItem is given, show the list and select that item @@ -1915,7 +1915,7 @@ const ItemList = Class("ItemList", { this._minHeight = 0; this._startIndex = this._endIndex = this._selIndex = -1; this._items = newItems; - this.reset(); + this.reset(true); if (typeof selectedItem == "number") { this.selectItem(selectedItem); this.show(); |