diff --git a/common/content/hints.js b/common/content/hints.js index 8a17950a..7ded7bb8 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -347,8 +347,10 @@ const Hints = Module("hints", { let prefix = (elem.getAttributeNS(NS, "class") || "") + " "; if (active) elem.setAttributeNS(NS, "highlight", prefix + "HintActive"); - else + else if (active != null) elem.setAttributeNS(NS, "highlight", prefix + "HintElem"); + else + elem.removeAttributeNS(NS, "highlight"); }, /** @@ -429,7 +431,6 @@ const Hints = Module("hints", { */ _removeHints: function (timeout, slight) { for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { - util.dump(String(doc), start, end); for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc)) elem.parentNode.removeChild(elem); for (let i in util.range(start, end + 1)) @@ -489,12 +490,10 @@ const Hints = Module("hints", { let n = 5; (function next() { - this._setClass(elem, n % 2); - util.dump(n, String(this._top)); + let hinted = n || this._validHints.some(function (e) e === elem); + this._setClass(elem, n ? n % 2 : !hinted ? null : this._validHints[Math.max(0, this._hintNumber-1)] === elem); if (n--) this.timeout(next, 50); - else if (!this._validHints.some(function (h) h.elem == elem)) - elem.removeAttributeNS(NS, "highlight"); }).call(this); this.timeout(function () { diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS index 20987801..df7b5ff8 100644 --- a/pentadactyl/NEWS +++ b/pentadactyl/NEWS @@ -21,6 +21,13 @@ * Multiple Ex commands may now be separated by | * Command-line is now hidden by default. Added C and M to 'guioptions'. + * Hint mode improvements, including: + - Added g; continued extended hint mode, which allows + selecting multiple hints. Removed ;F + - Hints are now updated after scrolling and window resizing. + - Added ;S mode for creating search keywords. + - Added 'hintkeys' option. + - Added "transliterated" option to 'hintmatching'. * JavaScript completion improvements, including: - The prototype of the function whose arguments are currently being typed is displayed during completion. @@ -48,7 +55,6 @@ * IMPORTANT: 'guioptions' default value has changed. * IMPORTANT: 'mapleader' is now an option rather than a :let variable. - * Added g; continued extended hint mode and removed ;F * Added "bookmarks", "diverted", and "links" to 'activate' option * Added 'altwildmode' and command-line key binding. @@ -59,8 +65,6 @@ * Added -keyword, -tags, -title to :delbmarks. * Added "passwords" and "venkman" dialogs to :dialog. * Added :extupdate command - * Added 'hintkeys' option. - * Added "transliterated" option to 'hintmatching'. * Replaced 'focuscontent' with 'strictfocus'. * Changed 'urlseparator' default value to '|' * Added 'wildanchor' option.