1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 00:47:59 +01:00

Auto-flush the autocomplete timer after feeding keys.

This commit is contained in:
Kris Maglione
2011-02-03 11:42:04 -05:00
parent b89ef65a59
commit d9ad94fb1e
2 changed files with 7 additions and 0 deletions

View File

@@ -983,6 +983,8 @@ var CommandLine = Module("commandline", {
this.itemList = commandline.completionList;
this.itemList.setItems(this.context);
dactyl.registerObserver("events.doneFeeding", this.closure.onDoneFeeding, true);
this.autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) {
if (!events.feedingKeys && options["autocomplete"].length) {
this.complete(true, false);
@@ -1001,6 +1003,10 @@ var CommandLine = Module("commandline", {
this.itemList.visible = false;
},
onDoneFeeding: function onDoneFeeding() {
this.autocompleteTimer.flush(true);
},
UP: {},
DOWN: {},
PAGE_UP: {},

View File

@@ -558,6 +558,7 @@ var Events = Module("events", {
this.feedingKeys = wasFeeding;
if (quiet)
commandline.quiet = wasQuiet;
dactyl.triggerObserver("events.doneFeeding");
}
return true;
},