mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 11:08:09 +01:00
Fix autocompletion bug while feeding keys. Closes issue #440.
This commit is contained in:
@@ -1015,9 +1015,9 @@ var CommandLine = Module("commandline", {
|
|||||||
dactyl.registerObserver("events.doneFeeding", this.closure.onDoneFeeding, true);
|
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)
|
if (events.feedingKeys && !tabPressed)
|
||||||
this.ignoredCount++;
|
this.ignoredCount++;
|
||||||
if (options["autocomplete"].length) {
|
else if (options["autocomplete"].length) {
|
||||||
this.itemList.visible = true;
|
this.itemList.visible = true;
|
||||||
this.complete(true, false);
|
this.complete(true, false);
|
||||||
}
|
}
|
||||||
@@ -1087,6 +1087,7 @@ var CommandLine = Module("commandline", {
|
|||||||
get wildtype() this.wildtypes[this.wildIndex] || "",
|
get wildtype() this.wildtypes[this.wildIndex] || "",
|
||||||
|
|
||||||
complete: function complete(show, tabPressed) {
|
complete: function complete(show, tabPressed) {
|
||||||
|
this.session.ignoredCount = 0;
|
||||||
this.context.reset();
|
this.context.reset();
|
||||||
this.context.tabPressed = tabPressed;
|
this.context.tabPressed = tabPressed;
|
||||||
this.session.complete(this.context);
|
this.session.complete(this.context);
|
||||||
@@ -1260,6 +1261,7 @@ var CommandLine = Module("commandline", {
|
|||||||
|
|
||||||
tab: function tab(reverse, wildmode) {
|
tab: function tab(reverse, wildmode) {
|
||||||
this.autocompleteTimer.flush();
|
this.autocompleteTimer.flush();
|
||||||
|
this.ignoredCount = 0;
|
||||||
|
|
||||||
if (this._caret != this.caret)
|
if (this._caret != this.caret)
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user