mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 09:17:59 +01:00
Auto-flush the autocomplete timer after feeding keys.
This commit is contained in:
@@ -983,6 +983,8 @@ var CommandLine = Module("commandline", {
|
|||||||
this.itemList = commandline.completionList;
|
this.itemList = commandline.completionList;
|
||||||
this.itemList.setItems(this.context);
|
this.itemList.setItems(this.context);
|
||||||
|
|
||||||
|
dactyl.registerObserver("events.doneFeeding", this.closure.onDoneFeeding, true);
|
||||||
|
|
||||||
this.autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) {
|
this.autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) {
|
||||||
if (!events.feedingKeys && options["autocomplete"].length) {
|
if (!events.feedingKeys && options["autocomplete"].length) {
|
||||||
this.complete(true, false);
|
this.complete(true, false);
|
||||||
@@ -1001,6 +1003,10 @@ var CommandLine = Module("commandline", {
|
|||||||
this.itemList.visible = false;
|
this.itemList.visible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDoneFeeding: function onDoneFeeding() {
|
||||||
|
this.autocompleteTimer.flush(true);
|
||||||
|
},
|
||||||
|
|
||||||
UP: {},
|
UP: {},
|
||||||
DOWN: {},
|
DOWN: {},
|
||||||
PAGE_UP: {},
|
PAGE_UP: {},
|
||||||
|
|||||||
@@ -558,6 +558,7 @@ var Events = Module("events", {
|
|||||||
this.feedingKeys = wasFeeding;
|
this.feedingKeys = wasFeeding;
|
||||||
if (quiet)
|
if (quiet)
|
||||||
commandline.quiet = wasQuiet;
|
commandline.quiet = wasQuiet;
|
||||||
|
dactyl.triggerObserver("events.doneFeeding");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user