mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 17:47:59 +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:
@@ -25,7 +25,6 @@ var Hints = Module("hints", {
|
|||||||
this._validHints = []; // store the indices of the "hints" array with valid elements
|
this._validHints = []; // store the indices of the "hints" array with valid elements
|
||||||
|
|
||||||
this._activeTimeout = null; // needed for hinttimeout > 0
|
this._activeTimeout = null; // needed for hinttimeout > 0
|
||||||
this._canUpdate = false;
|
|
||||||
|
|
||||||
// keep track of the documents which we generated the hints for
|
// 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[] }
|
// 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.prevInput = "";
|
||||||
this.escNumbers = false;
|
this.escNumbers = false;
|
||||||
this._usedTabKey = false;
|
this._usedTabKey = false;
|
||||||
this._canUpdate = false;
|
|
||||||
this._hintNumber = 0;
|
this._hintNumber = 0;
|
||||||
this._hintString = "";
|
this._hintString = "";
|
||||||
statusline.updateInputBuffer("");
|
statusline.updateInputBuffer("");
|
||||||
@@ -869,7 +867,6 @@ var Hints = Module("hints", {
|
|||||||
this._hintNumber = 0;
|
this._hintNumber = 0;
|
||||||
this._usedTabKey = false;
|
this._usedTabKey = false;
|
||||||
this.prevInput = "";
|
this.prevInput = "";
|
||||||
this._canUpdate = false;
|
|
||||||
this._continue = Boolean(opts.continue);
|
this._continue = Boolean(opts.continue);
|
||||||
|
|
||||||
this._top = opts.window || content;
|
this._top = opts.window || content;
|
||||||
@@ -877,10 +874,6 @@ var Hints = Module("hints", {
|
|||||||
|
|
||||||
this._generate();
|
this._generate();
|
||||||
|
|
||||||
// get all keys from the input queue
|
|
||||||
util.threadYield(true);
|
|
||||||
|
|
||||||
this._canUpdate = true;
|
|
||||||
this._showHints();
|
this._showHints();
|
||||||
|
|
||||||
if (this._validHints.length == 0) {
|
if (this._validHints.length == 0) {
|
||||||
@@ -929,9 +922,6 @@ var Hints = Module("hints", {
|
|||||||
|
|
||||||
this._updateStatusline();
|
this._updateStatusline();
|
||||||
|
|
||||||
if (!this._canUpdate)
|
|
||||||
return PASS;
|
|
||||||
|
|
||||||
if (this._docs.length == 0) {
|
if (this._docs.length == 0) {
|
||||||
this._generate();
|
this._generate();
|
||||||
this._showHints();
|
this._showHints();
|
||||||
@@ -1074,13 +1064,11 @@ var Hints = Module("hints", {
|
|||||||
hints.clearTimeout();
|
hints.clearTimeout();
|
||||||
hints._updateStatusline();
|
hints._updateStatusline();
|
||||||
|
|
||||||
if (hints._canUpdate) {
|
if (hints._docs.length == 0 && hints._hintString.length > 0)
|
||||||
if (hints._docs.length == 0 && hints._hintString.length > 0)
|
hints._generate();
|
||||||
hints._generate();
|
|
||||||
|
|
||||||
hints._showHints();
|
hints._showHints();
|
||||||
hints._processHints(followFirst);
|
hints._processHints(followFirst);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mappings.add(modes.HINTS, ["<Return>"],
|
mappings.add(modes.HINTS, ["<Return>"],
|
||||||
|
|||||||
Reference in New Issue
Block a user