diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js
index 1195af43..0cb4d0ab 100644
--- a/common/content/bookmarks.js
+++ b/common/content/bookmarks.js
@@ -58,7 +58,8 @@ const Bookmarks = Module("bookmarks", {
if (!id)
return false;
- PlacesUtils.setPostDataForBookmark(id, post);
+ if (post !== undefined)
+ PlacesUtils.setPostDataForBookmark(id, post);
if (keyword)
services.get("bookmarks").setKeywordForBookmark(id, keyword);
}
@@ -359,7 +360,7 @@ const Bookmarks = Module("bookmarks", {
force: args.bang,
starOnly: false,
keyword: args["-keyword"] || null,
- post: args["-post"] || null,
+ post: args["-post"],
tags: args["-tags"] || [],
title: args["-title"] || (args.length === 0 ? buffer.title : null),
url: args.length === 0 ? buffer.URL : args[0]
diff --git a/common/content/hints.js b/common/content/hints.js
index 5815372e..4e672459 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -38,6 +38,9 @@ const Hints = Module("hints", {
self._showHints();
}
});
+ let appContent = document.getElementById("appcontent");
+ if (appContent)
+ events.addSessionListener(appContent, "scroll", this._resizeTimer.closure.tell, false);
const Mode = Hints.Mode;
Mode.defaultValue("tags", function () function () options["hinttags"]);
@@ -91,8 +94,15 @@ const Hints = Module("hints", {
this._activeTimeout = null;
},
__reset: function () {
- if (!this._usedTabKey)
+ if (!this._usedTabKey) {
this._hintNumber = 0;
+ }
+ if (this.__continue && this._validHints.length <= 1) {
+ this._hintString = "";
+ commandline.command = this._hintString;
+ this._showHints();
+ }
+ this._updateStatusline();
},
/**
@@ -334,11 +344,11 @@ const Hints = Module("hints", {
* @param {boolean} active Whether it is the currently active hint or not.
*/
_setClass: function (elem, active) {
- let prefix = (elem.getAttributeNS(NS.uri, "class") || "") + " ";
+ let prefix = (elem.getAttributeNS(NS, "class") || "") + " ";
if (active)
- elem.setAttributeNS(NS.uri, "highlight", prefix + "HintActive");
+ elem.setAttributeNS(NS, "highlight", prefix + "HintActive");
else
- elem.setAttributeNS(NS.uri, "highlight", prefix + "HintElem");
+ elem.setAttributeNS(NS, "highlight", prefix + "HintElem");
},
/**
@@ -363,7 +373,7 @@ const Hints = Module("hints", {
hint.imgSpan.style.display = (valid ? "" : "none");
if (!valid) {
- hint.elem.removeAttributeNS(NS.uri, "highlight");
+ hint.elem.removeAttributeNS(NS, "highlight");
continue inner;
}
@@ -399,7 +409,7 @@ const Hints = Module("hints", {
// FIXME: Broken for imgspans.
for (let [, { doc: doc }] in Iterator(this._docs)) {
for (let elem in util.evaluateXPath("//*[@dactyl:highlight and @number]", doc)) {
- let group = elem.getAttributeNS(NS.uri, "highlight");
+ let group = elem.getAttributeNS(NS, "highlight");
css.push(highlight.selector(group) + "[number=" + elem.getAttribute("number").quote() + "] { " + elem.style.cssText + " }");
}
}
@@ -418,20 +428,12 @@ const Hints = Module("hints", {
* hint disappears.
*/
_removeHints: function (timeout, slight) {
- let firstElem = this._validHints[0] || null;
-
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)) {
- let hint = this._pageHints[i];
- if (!timeout || hint.elem != firstElem)
- hint.elem.removeAttributeNS(NS.uri, "highlight");
- }
-
- // animate the disappearance of the first hint
- if (timeout && firstElem)
- this.timeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight"); }, timeout);
+ for (let i in util.range(start, end + 1))
+ this._pageHints[i].elem.removeAttributeNS(NS, "highlight");
}
styles.removeSheet(true, "hint-positions");
@@ -479,17 +481,21 @@ const Hints = Module("hints", {
let activeIndex = (this._hintNumber ? this._hintNumber - 1 : 0);
let elem = this._validHints[activeIndex];
let top = this._top;
- if (this._continue) {
+
+ if (this._continue)
this.__reset();
- if (this._validHints.length <= 1)
- this._showHints();
- }
- else {
+ else
this._removeHints(timeout);
- if (timeout == 0)
- // force a possible mode change, based on whether an input field has focus
- events.onFocusChange();
- }
+
+ let n = 5;
+ (function next() {
+ this._setClass(elem, n % 2);
+ util.dump(n, String(this._top));
+ 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 () {
if ((modes.extended & modes.HINTS) && !this._continue)
@@ -512,7 +518,9 @@ const Hints = Module("hints", {
if (this._hintNumber > 0 && this._hintNumber * this.hintKeys.length <= this._validHints.length) {
let timeout = options["hinttimeout"];
if (timeout > 0)
- this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout);
+ this._activeTimeout = this.timeout(function () {
+ this._processHints(true);
+ }, timeout);
}
else // we have a unique hint
this._processHints(true);
@@ -906,6 +914,7 @@ const Hints = Module("hints", {
dactyl.assert(this._hintNumber != 0);
this._checkUnique();
+ return;
}
}
diff --git a/common/content/javascript.js b/common/content/javascript.js
index c0d30380..a29ffadf 100644
--- a/common/content/javascript.js
+++ b/common/content/javascript.js
@@ -537,7 +537,7 @@ const JavaScript = Module("javascript", {
args.push(key + string);
let compl = function (context, obj) {
- let res = completer.call(self, context, funcName, obj, args);
+ let res = completer.call(self, context, funcName, obj.obj, args);
if (res)
context.completions = res;
};
diff --git a/common/locale/en-US/all.xml b/common/locale/en-US/all.xml
index ccb98583..52586868 100644
--- a/common/locale/en-US/all.xml
+++ b/common/locale/en-US/all.xml
@@ -12,29 +12,29 @@
+ Most Ex commands accept a number of options and arguments. Arguments and
+ options are generally separated by spaces, and treat a number of
+ characters, including \, ', ", and |,
+ specially. Moreover, certain arguments have their own special characters.
+ For instance, when using
+ &dactyl.appName; offers four distinct quoting styles, each with its own
+ distinct advantages and disadvantages. The first, and most basic, is the
+ automatic quoting applied to the commands listed in
'foo\ ''bar\\ baz\' ⇒ foo\ 'bar\\ baz\
+
+ Many Ex commands accept option arguments in addition to regular arguments.
+ Option arguments begin with a hyphen (-), and often have a short
+ form and a long form, such as -name and -n. Most options
+ accept arguments, which come after the option separated by either a space
+ or an equal sign. For instance, the following three forms,
+