diff --git a/common/content/hints.js b/common/content/hints.js index d1536915..59474707 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -208,12 +208,13 @@ function Hints() //{{{ let hint = pageHints[i]; [elem, text, span, imgspan] = hint; - if (!validHint(text)) - { - span.style.display = "none"; - if (imgspan) - imgspan.style.display = "none"; + let valid = validHint(text); + span.style.display = (valid ? "" : "none"); + if (imgspan) + imgspan.style.display = (valid ? "" : "none"); + if (!valid) + { elem.removeAttributeNS(NS.uri, "highlight"); continue inner; } @@ -238,7 +239,6 @@ function Hints() //{{{ setClass(imgspan, activeHint == hintnum) } - span.style.display = "inline"; span.setAttribute("number", hintnum++); if (imgspan) imgspan.setAttribute("number", hintnum); diff --git a/common/content/mappings.js b/common/content/mappings.js index b10c4e42..ffc0ab60 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -401,7 +401,7 @@ function Mappings() //{{{ // TODO: Move this to an ItemList to show this automatically if (list.*.length() == list.text().length()) { - liberator.echo(
No mappings found
, commandline.FORCE_MULTILINE); + liberator.echo("No mapping found"); return; } commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); diff --git a/common/content/ui.js b/common/content/ui.js index af165807..d0201e21 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -241,7 +241,7 @@ function CommandLine() //{{{ if (show) { this.itemList.reset(); - this.select(this.RESET); + this.selected = null; this.wildIndex = 0; } @@ -251,16 +251,9 @@ function CommandLine() //{{{ _reset: function _reset() { - this.prefix = this.context.value.substring(0, this.start); - this.value = this.context.value.substring(this.start, this.caret); - this.suffix = this.context.value.substring(this.caret); - this.itemList.reset(); this.itemList.selectItem(this.selected); - this.wildIndex = 0; - this.wildtypes = this.wildmode.values; - this.preview(); },