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

Purge hints of _canUpdate/initial threadYield. I'm sure they had a purpose, but if they did they caused more trouble and confusion than they were worth.

This commit is contained in:
Kris Maglione
2011-01-20 00:50:51 -05:00
parent 430468ee01
commit c5221fc24d

View File

@@ -25,7 +25,6 @@ var Hints = Module("hints", {
this._validHints = []; // store the indices of the "hints" array with valid elements
this._activeTimeout = null; // needed for hinttimeout > 0
this._canUpdate = false;
// keep track of the documents which we generated the hints for
// this._docs = { doc: document, start: start_index in hints[], end: end_index in hints[] }
@@ -92,7 +91,6 @@ var Hints = Module("hints", {
this.prevInput = "";
this.escNumbers = false;
this._usedTabKey = false;
this._canUpdate = false;
this._hintNumber = 0;
this._hintString = "";
statusline.updateInputBuffer("");
@@ -869,7 +867,6 @@ var Hints = Module("hints", {
this._hintNumber = 0;
this._usedTabKey = false;
this.prevInput = "";
this._canUpdate = false;
this._continue = Boolean(opts.continue);
this._top = opts.window || content;
@@ -877,10 +874,6 @@ var Hints = Module("hints", {
this._generate();
// get all keys from the input queue
util.threadYield(true);
this._canUpdate = true;
this._showHints();
if (this._validHints.length == 0) {
@@ -929,9 +922,6 @@ var Hints = Module("hints", {
this._updateStatusline();
if (!this._canUpdate)
return PASS;
if (this._docs.length == 0) {
this._generate();
this._showHints();
@@ -1074,13 +1064,11 @@ var Hints = Module("hints", {
hints.clearTimeout();
hints._updateStatusline();
if (hints._canUpdate) {
if (hints._docs.length == 0 && hints._hintString.length > 0)
hints._generate();
if (hints._docs.length == 0 && hints._hintString.length > 0)
hints._generate();
hints._showHints();
hints._processHints(followFirst);
}
hints._showHints();
hints._processHints(followFirst);
}
mappings.add(modes.HINTS, ["<Return>"],