summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2014-03-15 14:45:21 +0100
committerportix <portix@gmx.net>2014-03-15 14:45:21 +0100
commit98c55b0f4c55ad1f33cab203d08b8327eb1b8ce9 (patch)
treef3f217262141376a6efb12abfa0ee65aa8f69dfb
parentef349ffe7197d6f5e264611560e0cf2314171a43 (diff)
downloaddwb-98c55b0f4c55ad1f33cab203d08b8327eb1b8ce9.zip
completion: defining _forward/_bachCache
-rw-r--r--scripts/modules/completion17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/modules/completion b/scripts/modules/completion
index 0c5f0ae6..e0594dfa 100644
--- a/scripts/modules/completion
+++ b/scripts/modules/completion
@@ -178,6 +178,9 @@ Object.defineProperties(Completion.prototype, {
_position : { value : 0, writable : true },
_timer : { value : null, writable : true },
_lastKeyRelease : { value : -1, writable : true },
+ _dataPosistion : { value : 0, writable : true },
+ _forwardCache : { value : null, writable : true },
+ _backwardCache : { value : null, writable : true },
cleanup : {
value : function() {
@@ -195,6 +198,8 @@ Object.defineProperties(Completion.prototype, {
this._height = 0;
this._lastText = "";
this._data = null;
+ this._forwardCache = null;
+ this._backwardCache = null;
this._initialData = null;
this._position = 0;
this._lastKeyRelease = -1;
@@ -448,6 +453,9 @@ Object.defineProperties(Completion.prototype, {
this._sigKeyRelease = Signal("keyRelease", this._onKeyRelease.bind(this));
bind(this.shortcut, this._bindCallback.bind(this));
+ if (this.renderPageSize == 0) {
+ this.renderPageSize = this.visibleItems * 3;
+ }
if (!this.onFilter) {
switch (this.matchStyle) {
@@ -534,10 +542,11 @@ Object.defineProperties(Completion.prototype, {
renderItems : { value : 20, writable : true },
fixedHeight : { value : false, writable : true },
match : { value : "both", writable : true },
- onReturn : { value : null, writable : true },
- onEscape : { value : null, writable : true },
- onForward : { value : null, writable : true },
- onBackward : { value : null, writable : true },
+ onReturn : { value : null, writable : true },
+ onEscape : { value : null, writable : true },
+ onForward : { value : null, writable : true },
+ onBackward : { value : null, writable : true },
+ renderPageSize : { value : 0, writable : true }
});
Object.defineProperties(Completion, {