1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 11:27:58 +01:00

Get rid of a lot of special casing in the event loops. Merge default.

--HG--
branch : mode-refactoring
This commit is contained in:
Kris Maglione
2010-10-10 15:19:27 -04:00
parent c977268278
commit d7ff35c565
13 changed files with 129 additions and 159 deletions

View File

@@ -567,7 +567,9 @@ const CommandLine = Module("commandline", {
this._startHints = false; this._startHints = false;
if (!(modes.extended & modes.OUTPUT_MULTILINE)) if (!(modes.extended & modes.OUTPUT_MULTILINE))
modes.push(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE); modes.push(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE, {
onEvent: this.closure.onMultilineOutputEvent
});
// If it's already XML, assume it knows what it's doing. // If it's already XML, assume it knows what it's doing.
// Otherwise, white space is significant. // Otherwise, white space is significant.
@@ -695,14 +697,13 @@ const CommandLine = Module("commandline", {
cancel: extra.onCancel cancel: extra.onCancel
}; };
modes.push(modes.COMMAND_LINE, modes.PROMPT | extra.extended, { modes.push(modes.COMMAND_LINE, modes.PROMPT | extra.extended,
enter: function (stack) { extra.enter && extra.enter(stack); }, update(Object.create(extra), {
leave: function (stack) { leave: function leave(stack) {
commandline.leave(stack); commandline.leave(stack);
if (extra.leave) leave.supercall(this, stack);
extra.leave(stack);
} }
}); }));
this.currentExtendedMode = modes.PROMPT; this.currentExtendedMode = modes.PROMPT;
this.widgets.prompt = !prompt ? null : [extra.promptHighlight || "Question", prompt]; this.widgets.prompt = !prompt ? null : [extra.promptHighlight || "Question", prompt];
@@ -934,14 +935,7 @@ const CommandLine = Module("commandline", {
} }
if (event instanceof MouseEvent) if (event instanceof MouseEvent)
return; return false;
if (this._startHints) {
statusline.updateInputBuffer("");
this._startHints = false;
hints.show(key, { window: win });
return;
}
function isScrollable() !win.scrollMaxY == 0; function isScrollable() !win.scrollMaxY == 0;
function atEnd() win.scrollY / win.scrollMaxY >= 1; function atEnd() win.scrollY / win.scrollMaxY >= 1;
@@ -953,7 +947,7 @@ const CommandLine = Module("commandline", {
case ":": case ":":
commandline.open(":", "", modes.EX); commandline.open(":", "", modes.EX);
return; return false;
// down a line // down a line
case "j": case "j":
@@ -1065,9 +1059,8 @@ const CommandLine = Module("commandline", {
break; break;
case ";": case ";":
statusline.updateInputBuffer(";"); hints.open(";", { window: win });
this._startHints = true; return false;
break;
// unmapped key // unmapped key
default: default:
@@ -1085,6 +1078,7 @@ const CommandLine = Module("commandline", {
} }
else else
commandline.updateMorePrompt(showMorePrompt, showMoreHelpPrompt); commandline.updateMorePrompt(showMorePrompt, showMoreHelpPrompt);
return false;
}, },
getSpaceNeeded: function getSpaceNeeded() { getSpaceNeeded: function getSpaceNeeded() {

View File

@@ -47,8 +47,7 @@ const Events = Module("events", {
this._code_key = {}; this._code_key = {};
this._key_code = {}; this._key_code = {};
for (let [k, v] in Iterator(KeyEvent)) for (let [k, v] in Iterator(KeyEvent)) {
if (/^DOM_VK_(?![A-Z0-9]$)/.test(k)) {
k = k.substr(7).toLowerCase(); k = k.substr(7).toLowerCase();
let names = [k.replace(/(^|_)(.)/g, function (m, n1, n2) n2.toUpperCase()) let names = [k.replace(/(^|_)(.)/g, function (m, n1, n2) n2.toUpperCase())
.replace(/^NUMPAD/, "k")]; .replace(/^NUMPAD/, "k")];
@@ -374,7 +373,7 @@ const Events = Module("events", {
* @param {string} keys The string to parse. * @param {string} keys The string to parse.
* @returns {Array[Object]} * @returns {Array[Object]}
*/ */
fromString: function (input) { fromString: function (input, unknownOk) {
let out = []; let out = [];
let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g"); let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g");
@@ -388,9 +387,10 @@ const Events = Module("events", {
let [match, modifier, keyname] = evt_str.match(/^<((?:[CSMA]-)*)(.+?)>$/i) || [false, '', '']; let [match, modifier, keyname] = evt_str.match(/^<((?:[CSMA]-)*)(.+?)>$/i) || [false, '', ''];
modifier = modifier.toUpperCase(); modifier = modifier.toUpperCase();
keyname = keyname.toLowerCase(); keyname = keyname.toLowerCase();
evt_obj.dactylKeyname = keyname;
if (keyname && !(keyname.length == 1 && modifier.length == 0 || // disallow <> and <a> if (keyname && !(keyname.length == 1 && modifier.length == 0 || // disallow <> and <a>
!(keyname.length == 1 || this._key_code[keyname] || keyname == "nop" || /mouse$/.test(keyname)))) { // disallow <misteak> !(unknownOk || keyname.length == 1 || this._key_code[keyname] || keyname == "nop" || /mouse$/.test(keyname)))) { // disallow <misteak>
evt_obj.ctrlKey = /C-/.test(modifier); evt_obj.ctrlKey = /C-/.test(modifier);
evt_obj.altKey = /A-/.test(modifier); evt_obj.altKey = /A-/.test(modifier);
evt_obj.shiftKey = /S-/.test(modifier); evt_obj.shiftKey = /S-/.test(modifier);
@@ -504,7 +504,7 @@ const Events = Module("events", {
else if (charCode > 0) { else if (charCode > 0) {
key = String.fromCharCode(charCode); key = String.fromCharCode(charCode);
if (key in this._key_code) { if (!/^[a-z0-9]$/i.test(key) && key in this._key_code) {
// a named charcode key (<Space> and <lt>) space can be shifted, <lt> must be forced // a named charcode key (<Space> and <lt>) space can be shifted, <lt> must be forced
if ((key.match(/^\s$/) && event.shiftKey) || event.dactylShift) if ((key.match(/^\s$/) && event.shiftKey) || event.dactylShift)
modifier += "S-"; modifier += "S-";
@@ -786,7 +786,7 @@ const Events = Module("events", {
try { try {
let stop = false; let stop = false;
let mode = modes.main; let mode = modes.getStack(0);
let win = document.commandDispatcher.focusedWindow; let win = document.commandDispatcher.focusedWindow;
if (win && win.document && "designMode" in win.document && win.document.designMode == "on" && !config.isComposeWindow) if (win && win.document && "designMode" in win.document && win.document.designMode == "on" && !config.isComposeWindow)
@@ -804,7 +804,7 @@ const Events = Module("events", {
// handler to escape the <Esc> key // handler to escape the <Esc> key
if (!stop || !isEscape(key)) if (!stop || !isEscape(key))
modes.pop(); modes.pop();
mode = modes.getStack(1).main; mode = modes.getStack(1);
} }
// handle Escape-all-keys mode (Ctrl-q) // handle Escape-all-keys mode (Ctrl-q)
@@ -815,66 +815,32 @@ const Events = Module("events", {
stop = true; // set to false if we should NOT consume this event but let the host app handle it stop = true; // set to false if we should NOT consume this event but let the host app handle it
// just forward event without checking any mappings when the MOW is open
if (mode == modes.COMMAND_LINE && (modes.extended & modes.OUTPUT_MULTILINE)) {
commandline.onMultilineOutputEvent(event);
return killEvent();
}
// XXX: ugly hack for now pass certain keys to the host app as // XXX: ugly hack for now pass certain keys to the host app as
// they are without beeping also fixes key navigation in combo // they are without beeping also fixes key navigation in combo
// boxes, submitting forms, etc. // boxes, submitting forms, etc.
// FIXME: breaks iabbr for now --mst // FIXME: breaks iabbr for now --mst
if (key in config.ignoreKeys && (config.ignoreKeys[key] & mode)) { if (key in config.ignoreKeys && (config.ignoreKeys[key] & mode.main)) {
this._input.buffer = ""; this._input.buffer = "";
return null; return null;
} }
// TODO: handle middle click in content area if (mode.params.onEvent) {
if (!isEscape(key)) {
// custom mode...
if (mode == modes.CUSTOM) {
plugins.onEvent(event);
return killEvent();
}
// All of these special cases for hint mode are driving
// me insane! -Kris
if (modes.extended & modes.HINTS) {
// under HINT mode, certain keys are redirected to hints.onEvent
if (key == "<Return>" || key == "<Tab>" || key == "<S-Tab>"
|| key == options["mapleader"]
|| (key == "<BS>" && hints.prevInput == "number")
|| (hints.isHintKey(key) && !hints.escNumbers)) {
hints.onEvent(event);
this._input.buffer = ""; this._input.buffer = "";
return killEvent(); // Bloody hell.
} if (key === "<C-h>")
key = event.dactylString = "<BS>";
// others are left to generate the 'input' event or handled by the host app if (mode.params.onEvent(event) === false)
killEvent();
return null; return null;
} }
}
// FIXME (maybe): (is an ESC or C-] here): on HINTS mode, it enters
// into 'if (map && !skipMap) below. With that (or however) it
// triggers the onEscape part, where it resets mode. Here I just
// return true, with the effect that it also gets to there (for
// whatever reason). if that happens to be correct, well..
// XXX: why not just do that as well for HINTS mode actually?
if (mode == modes.CUSTOM)
return null;
let mainMode = modes.getMode(mode);
let inputStr = this._input.buffer + key; let inputStr = this._input.buffer + key;
let countStr = inputStr.match(/^[1-9][0-9]*|/)[0]; let countStr = inputStr.match(/^[1-9][0-9]*|/)[0];
let candidateCommand = inputStr.substr(countStr.length); let candidateCommand = inputStr.substr(countStr.length);
let map = mappings[event.noremap ? "getDefault" : "get"](mode, candidateCommand); let map = mappings[event.noremap ? "getDefault" : "get"](mode.main, candidateCommand);
let candidates = mappings.getCandidates(mode, candidateCommand); let candidates = mappings.getCandidates(mode.main, candidateCommand);
if (candidates.length == 0 && !map) { if (candidates.length == 0 && !map) {
map = this._input.pendingMap; map = this._input.pendingMap;
this._input.pendingMap = null; this._input.pendingMap = null;
@@ -885,7 +851,7 @@ const Events = Module("events", {
// counts must be at the start of a complete mapping (10j -> go 10 lines down) // counts must be at the start of a complete mapping (10j -> go 10 lines down)
if (countStr && !candidateCommand) { if (countStr && !candidateCommand) {
// no count for insert mode mappings // no count for insert mode mappings
if (!mainMode.count || mainMode.input) if (!mode.mainMode.count || mode.mainMode.input)
stop = false; stop = false;
else else
this._input.buffer = inputStr; this._input.buffer = inputStr;
@@ -930,14 +896,14 @@ const Events = Module("events", {
stop = false; stop = false;
} }
} }
else if (mappings.getCandidates(mode, candidateCommand).length > 0 && !event.skipmap) { else if (mappings.getCandidates(mode.main, candidateCommand).length > 0 && !event.skipmap) {
this._input.pendingMap = map; this._input.pendingMap = map;
this._input.buffer += key; this._input.buffer += key;
} }
else { // if the key is neither a mapping nor the start of one else { // if the key is neither a mapping nor the start of one
// the mode checking is necessary so that things like g<esc> do not beep // the mode checking is necessary so that things like g<esc> do not beep
if (this._input.buffer != "" && !event.skipmap && if (this._input.buffer != "" && !event.skipmap &&
(mode & (modes.INSERT | modes.COMMAND_LINE | modes.TEXT_EDIT))) (mode.main & (modes.INSERT | modes.COMMAND_LINE | modes.TEXT_EDIT)))
events.feedkeys(this._input.buffer, { noremap: true, skipmap: true }); events.feedkeys(this._input.buffer, { noremap: true, skipmap: true });
this._input.buffer = ""; this._input.buffer = "";
@@ -947,15 +913,15 @@ const Events = Module("events", {
if (!isEscape(key)) { if (!isEscape(key)) {
// allow key to be passed to the host app if we can't handle it // allow key to be passed to the host app if we can't handle it
stop = (mode == modes.TEXT_EDIT); stop = (mode.main === modes.TEXT_EDIT);
if (mode == modes.COMMAND_LINE) { if (mode.main === modes.COMMAND_LINE) {
if (!(modes.extended & modes.INPUT_MULTILINE)) if (!(modes.extended & modes.INPUT_MULTILINE))
dactyl.trapErrors(function () { dactyl.trapErrors(function () {
commandline.onEvent(event); // reroute event in command line mode commandline.onEvent(event); // reroute event in command line mode
}); });
} }
else if (!mainMode.input) else if (!mode.mainMode.input)
dactyl.beep(); dactyl.beep();
} }
} }

View File

@@ -352,8 +352,8 @@
<xsl:template match="dactyl:dl" mode="help-2"> <xsl:template match="dactyl:dl" mode="help-2">
<dl> <dl>
<column/> <column style="{@dt}"/>
<column/> <column style="{@dd}"/>
<xsl:for-each select="dactyl:dt"> <xsl:for-each select="dactyl:dt">
<tr> <tr>
<xsl:apply-templates select="." mode="help-1"/> <xsl:apply-templates select="." mode="help-1"/>

View File

@@ -83,7 +83,7 @@ const Hints = Module("hints", {
this._hintNumber = 0; this._hintNumber = 0;
this._hintString = ""; this._hintString = "";
statusline.updateInputBuffer(""); statusline.updateInputBuffer("");
commandline.command = ""; commandline.widgets.command = "";
} }
this._pageHints = []; this._pageHints = [];
this._validHints = []; this._validHints = [];
@@ -97,9 +97,9 @@ const Hints = Module("hints", {
if (!this._usedTabKey) { if (!this._usedTabKey) {
this._hintNumber = 0; this._hintNumber = 0;
} }
if (this.__continue && this._validHints.length <= 1) { if (this._continue && this._validHints.length <= 1) {
this._hintString = ""; this._hintString = "";
commandline.command = this._hintString; commandline.widgets.command = this._hintString;
this._showHints(); this._showHints();
} }
this._updateStatusline(); this._updateStatusline();
@@ -347,8 +347,10 @@ const Hints = Module("hints", {
let prefix = (elem.getAttributeNS(NS, "class") || "") + " "; let prefix = (elem.getAttributeNS(NS, "class") || "") + " ";
if (active) if (active)
elem.setAttributeNS(NS, "highlight", prefix + "HintActive"); elem.setAttributeNS(NS, "highlight", prefix + "HintActive");
else else if (active != null)
elem.setAttributeNS(NS, "highlight", prefix + "HintElem"); elem.setAttributeNS(NS, "highlight", prefix + "HintElem");
else
elem.removeAttributeNS(NS, "highlight");
}, },
/** /**
@@ -429,7 +431,6 @@ const Hints = Module("hints", {
*/ */
_removeHints: function (timeout, slight) { _removeHints: function (timeout, slight) {
for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { 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)) for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc))
elem.parentNode.removeChild(elem); elem.parentNode.removeChild(elem);
for (let i in util.range(start, end + 1)) for (let i in util.range(start, end + 1))
@@ -489,12 +490,10 @@ const Hints = Module("hints", {
let n = 5; let n = 5;
(function next() { (function next() {
this._setClass(elem, n % 2); let hinted = n || this._validHints.some(function (e) e === elem);
util.dump(n, String(this._top)); this._setClass(elem, n ? n % 2 : !hinted ? null : this._validHints[Math.max(0, this._hintNumber-1)] === elem);
if (n--) if (n--)
this.timeout(next, 50); this.timeout(next, 50);
else if (!this._validHints.some(function (h) h.elem == elem))
elem.removeAttributeNS(NS, "highlight");
}).call(this); }).call(this);
this.timeout(function () { this.timeout(function () {
@@ -765,6 +764,20 @@ const Hints = Module("hints", {
*/ */
isHintKey: function (key) this.hintKeys.indexOf(key) >= 0, isHintKey: function (key) this.hintKeys.indexOf(key) >= 0,
open: function (mode, opts) {
this._extendedhintCount = opts.count;
commandline.input(";", null, {
promptHighlight: "Normal",
completer: function (context) {
context.compare = function () 0;
context.completions = [[k, v.prompt] for ([k, v] in Iterator(hints._hintModes))];
},
onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); },
get onCancel() this.onAccept,
onChange: function () { modes.pop(); }
});
},
/** /**
* Updates the display of hints. * Updates the display of hints.
* *
@@ -782,7 +795,8 @@ const Hints = Module("hints", {
if (!stack.push) if (!stack.push)
hints.hide(); hints.hide();
}, },
onChange: this.closure._onInput onChange: this.closure._onInput,
onEvent: this.closure.onEvent
}); });
modes.extended = modes.HINTS; modes.extended = modes.HINTS;
@@ -864,9 +878,12 @@ const Hints = Module("hints", {
} }
this._showActiveHint(this._hintNumber, oldId); this._showActiveHint(this._hintNumber, oldId);
this._updateStatusline(); this._updateStatusline();
return; return false;
case "<BS>": case "<BS>":
if (this.prevInput !== "number")
return true;
if (this._hintNumber > 0 && !this._usedTabKey) { if (this._hintNumber > 0 && !this._usedTabKey) {
this._hintNumber = Math.floor(this._hintNumber / this.hintKeys.length); this._hintNumber = Math.floor(this._hintNumber / this.hintKeys.length);
if (this._hintNumber == 0) if (this._hintNumber == 0)
@@ -886,10 +903,10 @@ const Hints = Module("hints", {
this._hintNumber = 0; this._hintNumber = 0;
this._updateStatusline(); this._updateStatusline();
return; return false;
default: default:
if (this.isHintKey(key)) { if (!this.escNumbers && this.isHintKey(key)) {
this.prevInput = "number"; this.prevInput = "number";
let oldHintNumber = this._hintNumber; let oldHintNumber = this._hintNumber;
@@ -914,8 +931,9 @@ const Hints = Module("hints", {
dactyl.assert(this._hintNumber != 0); dactyl.assert(this._hintNumber != 0);
this._checkUnique(); this._checkUnique();
return; return false;
} }
return true;
} }
this._updateStatusline(); this._updateStatusline();
@@ -927,6 +945,7 @@ const Hints = Module("hints", {
this._showHints(); this._showHints();
this._processHints(followFirst); this._processHints(followFirst);
} }
return false;
} }
//}}} //}}}
}, { }, {
@@ -1052,30 +1071,15 @@ const Hints = Module("hints", {
"Start QuickHint mode, but open link in a new tab", "Start QuickHint mode, but open link in a new tab",
function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); function () { hints.show(options.get("activate").has("links") ? "t" : "b"); });
function inputOpts(opts) ({
promptHighlight: "Normal",
completer: function (context) {
context.compare = function () 0;
context.completions = [[k, v.prompt] for ([k, v] in Iterator(hints._hintModes))];
},
onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); },
onChange: function () { modes.pop(); },
onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }
});
mappings.add(myModes, [";"], mappings.add(myModes, [";"],
"Start an extended hint mode", "Start an extended hint mode",
function (count) { function (count) { hints.open(";", { count: count }); },
this._extendedhintCount = count; { count: true });
commandline.input(";", null, inputOpts());
}, { count: true });
mappings.add(myModes, ["g;"], mappings.add(myModes, ["g;"],
"Start an extended hint mode and stay there until <Esc> is pressed", "Start an extended hint mode and stay there until <Esc> is pressed",
function (count) { function (count) { hints.open("g;", { continue: true, count: count }); },
this._extendedhintCount = count; { count: true });
commandline.input("g;", null, inputOpts({ continue: true }));
}, { count: true });
}, },
options: function () { options: function () {
const DEFAULT_HINTTAGS = const DEFAULT_HINTTAGS =

View File

@@ -164,7 +164,7 @@
given in a single command line and will be executed consecutively. given in a single command line and will be executed consecutively.
<em>|</em> can be included as an argument to a command by escaping <em>|</em> can be included as an argument to a command by escaping
it with a backslash. E.g. it with a backslash. E.g.
<code><ex>:map \| :echo "bar"<k name="CR"/></ex></code> <code><ex>:map \|</ex> <ex>:echo <str>bar</str></ex><k name="CR"/></code>
Several commands process the entire command line string literally. Several commands process the entire command line string literally.
These commands will include any <em>|</em> as part of their These commands will include any <em>|</em> as part of their
@@ -239,7 +239,7 @@
optional quoting characters are available: optional quoting characters are available:
</p> </p>
<dl> <dl dt="width: 8em;">
<dt>\</dt> <dt>\</dt>
<dd> <dd>
This is the most basic quoting character. When it is encountered This is the most basic quoting character. When it is encountered
@@ -261,7 +261,7 @@
included by preceding it with a backslash. Any other occurrence of a included by preceding it with a backslash. Any other occurrence of a
backslash starts an escape sequence as in JavaScript strings. Among backslash starts an escape sequence as in JavaScript strings. Among
the available escape sequences are: the available escape sequences are:
<dl> <dl dt="width: 8em;">
<dt>\n</dt> <dd>A newline character.</dd> <dt>\n</dt> <dd>A newline character.</dd>
<dt>\t</dt> <dd>A tab character.</dd> <dt>\t</dt> <dd>A tab character.</dd>
<dt>\0nn</dt> <dd>Where each <em>n</em> is a digit between 0 and 7, represents an octal character code.</dd> <dt>\0nn</dt> <dd>Where each <em>n</em> is a digit between 0 and 7, represents an octal character code.</dd>

View File

@@ -48,7 +48,7 @@
common modes, common modes,
</p> </p>
<dl> <dl dt="width: 8em;">
<dt>n</dt> <dd>Normal mode: When browsing normally</dd> <dt>n</dt> <dd>Normal mode: When browsing normally</dd>
<dt>v</dt> <dd>Visual mode: When selecting text with the cursor keys</dd> <dt>v</dt> <dd>Visual mode: When selecting text with the cursor keys</dd>
<dt>i</dt> <dd>Insert mode: When interacting with text fields on a website</dd> <dt>i</dt> <dd>Insert mode: When interacting with text fields on a website</dd>
@@ -108,7 +108,7 @@
Any of the map commands may be given the following options: Any of the map commands may be given the following options:
</p> </p>
<dl> <dl dt="width: 12em;">
<dt></dt> <dd></dd> <dt></dt> <dd></dd>
<dt>-builtin</dt> <dd>Execute this mapping as if there were no user-defined mappings (short name <em>-b</em>)</dd> <dt>-builtin</dt> <dd>Execute this mapping as if there were no user-defined mappings (short name <em>-b</em>)</dd>
@@ -303,7 +303,7 @@
sequences are interpreted as described, sequences are interpreted as described,
</p> </p>
<dl> <dl dt="width: 10em;">
<dt><k>xc</k></dt> <dt><k>xc</k></dt>
<dd>Type the X key followed by the C key</dd> <dd>Type the X key followed by the C key</dd>

View File

@@ -45,7 +45,7 @@
<p>The following options are available,</p> <p>The following options are available,</p>
<dl> <dl dt="width: 8em;">
<dt>-keyword</dt> <dt>-keyword</dt>
<dd> <dd>
A keyword which may be used to open the bookmark via A keyword which may be used to open the bookmark via
@@ -124,7 +124,7 @@
<p>The bookmarks may also be filtered via the following options,</p> <p>The bookmarks may also be filtered via the following options,</p>
<dl> <dl dt="width: 8em;">
<dt>-keyword</dt> <dt>-keyword</dt>
<dd> <dd>
The bookmark's keyword (short name <em>-k</em>). The bookmark's keyword (short name <em>-k</em>).
@@ -273,7 +273,7 @@
<p>The pages may also be filtered via the following options,</p> <p>The pages may also be filtered via the following options,</p>
<dl> <dl dt="width: 8em;">
<dt>-max</dt> <dt>-max</dt>
<dd> <dd>
The maximum number of items to list or open The maximum number of items to list or open

View File

@@ -25,8 +25,8 @@
achieve special effects. These options come in 8 forms: achieve special effects. These options come in 8 forms:
</p> </p>
<dl> <dl dt="width: 10em;">
<dt>boolean</dt> <dd>Can only be on or off</dd> <dt>boolean</dt> <dd>Can only be <hl key="Boolean">on</hl> or <hl key="Boolean">off</hl></dd>
<dt>number</dt> <dd>A numeric value</dd> <dt>number</dt> <dd>A numeric value</dd>
<dt>string</dt> <dd>A string value</dd> <dt>string</dt> <dd>A string value</dd>
@@ -44,7 +44,7 @@
<dt/><dd tag="stringmap"/> <dt/><dd tag="stringmap"/>
<dt>stringmap</dt> <dt>stringmap</dt>
<dd>A comma-separated list of key-value pairs, e.g., <str>key:val,foo:bar</str></dd> <dd>A comma-separated list of key-value pairs, e.g., <str delim="">key:val,foo:bar</str></dd>
<dt/><dd tag="regexlist"/> <dt/><dd tag="regexlist"/>
<dt>regexlist</dt> <dt>regexlist</dt>
@@ -430,7 +430,7 @@
<description> <description>
<p>Items which are completed at the <ex>:open</ex> prompts. Available items:</p> <p>Items which are completed at the <ex>:open</ex> prompts. Available items:</p>
<dl> <dl dt="width: 6em;">
<dt>s</dt> <dd>Search engines and keyword URLs</dd> <dt>s</dt> <dd>Search engines and keyword URLs</dd>
<dt>f</dt> <dd>Local files</dd> <dt>f</dt> <dd>Local files</dd>
<dt>l</dt> <dd>&dactyl.host; location bar entries (bookmarks and history sorted in an intelligent way)</dd> <dt>l</dt> <dd>&dactyl.host; location bar entries (bookmarks and history sorted in an intelligent way)</dd>
@@ -598,7 +598,7 @@
<p>Possible values:</p> <p>Possible values:</p>
<dl> <dl dt="width: 6em;">
<dt>0</dt> <dd>Follow the first hint as soon as typed text uniquely identifies it.</dd> <dt>0</dt> <dd>Follow the first hint as soon as typed text uniquely identifies it.</dd>
<dt>1</dt> <dd>Follow the selected hint on <k name="Return"/>.</dd> <dt>1</dt> <dd>Follow the selected hint on <k name="Return"/>.</dd>
<dt>2</dt> <dd>Follow the selected hint on <k name="Return"/> only if it's been <k name="Tab" mode="c"/>-selected.</dd> <dt>2</dt> <dd>Follow the selected hint on <k name="Return"/> only if it's been <k name="Tab" mode="c"/>-selected.</dd>
@@ -630,7 +630,7 @@
<p>Supported characters:</p> <p>Supported characters:</p>
<dl> <dl dt="width: 6em;">
<dt>B</dt> <dd>Bookmark bar</dd> <dt>B</dt> <dd>Bookmark bar</dd>
<dt>C</dt> <dd>Always show the command-line outside of the status line</dd> <dt>C</dt> <dd>Always show the command-line outside of the status line</dd>
<dt>M</dt> <dd>Always show messages outside of the status line</dd> <dt>M</dt> <dd>Always show messages outside of the status line</dd>
@@ -676,7 +676,7 @@
given, and the first successful value is used. given, and the first successful value is used.
</p> </p>
<dl> <dl dt="width: 8em;">
<dt>value</dt> <dd>The hint is the value displayed in a text input, or the selected option for a drop-down.</dd> <dt>value</dt> <dd>The hint is the value displayed in a text input, or the selected option for a drop-down.</dd>
<dt>label</dt> <dd>The value of an explicit label for the input; this will not match most manually added labels that are found on sites.</dd> <dt>label</dt> <dd>The value of an explicit label for the input; this will not match most manually added labels that are found on sites.</dd>
<dt>name </dt> <dd>The name of the input will be used; although the name is not designed for user consumption, it is frequently very similar to the label.</dd> <dt>name </dt> <dd>The name of the input will be used; although the name is not designed for user consumption, it is frequently very similar to the label.</dd>
@@ -869,7 +869,7 @@
<p>Possible values:</p> <p>Possible values:</p>
<dl> <dl dt="width: 6em;">
<dt>0</dt> <dd>Never</dd> <dt>0</dt> <dd>Never</dd>
<dt>1</dt> <dd>Only if there are multiple windows</dd> <dt>1</dt> <dd>Only if there are multiple windows</dd>
<dt>2</dt> <dd>Always</dd> <dt>2</dt> <dd>Always</dd>
@@ -1045,7 +1045,7 @@
<p>Items available by default:</p> <p>Items available by default:</p>
<dl> <dl dt="width: 6em;">
<dt>g</dt> <dd>General info</dd> <dt>g</dt> <dd>General info</dd>
<dt>f</dt> <dd>Feeds</dd> <dt>f</dt> <dd>Feeds</dd>
<dt>m</dt> <dd>Meta tags</dd> <dt>m</dt> <dd>Meta tags</dd>
@@ -1073,7 +1073,7 @@
<p>Possible values are:</p> <p>Possible values are:</p>
<dl> <dl dt="width: 8em;">
<dt>tab</dt> <dd>Open pop-ups in a new tab</dd> <dt>tab</dt> <dd>Open pop-ups in a new tab</dd>
<dt>window</dt> <dd>Open pop-ups in a new window</dd> <dt>window</dt> <dd>Open pop-ups in a new window</dd>
<dt>resized</dt> <dd>Open resized pop-ups in a new window</dd> <dt>resized</dt> <dd>Open resized pop-ups in a new window</dd>
@@ -1185,7 +1185,7 @@
deleted. The value must be of the one of: deleted. The value must be of the one of:
</p> </p>
<dl> <dl dt="width: 8em;">
<dt>all</dt> <dd>Everything</dd> <dt>all</dt> <dd>Everything</dd>
<dt>session</dt> <dd>The current session</dd> <dt>session</dt> <dd>The current session</dd>
<dt><a>n</a>m</dt> <dd>Past <a>n</a> Minutes</dd> <dt><a>n</a>m</dt> <dd>Past <a>n</a> Minutes</dd>
@@ -1258,7 +1258,7 @@
<p>Possible values are:</p> <p>Possible values are:</p>
<dl> <dl dt="width: 6em;">
<dt>0</dt> <dd>Don't show link destination</dd> <dt>0</dt> <dd>Don't show link destination</dd>
<dt>1</dt> <dd>Show the link's destination in the <t>status-line</t></dd> <dt>1</dt> <dd>Show the link's destination in the <t>status-line</t></dd>
<dt>2</dt> <dd>Show the link's destination in the <t>command-line</t></dd> <dt>2</dt> <dd>Show the link's destination in the <t>command-line</t></dd>
@@ -1276,7 +1276,7 @@
<p>Possible values are:</p> <p>Possible values are:</p>
<dl> <dl dt="width: 6em;">
<dt>0</dt> <dd>Never show tab line</dd> <dt>0</dt> <dd>Never show tab line</dd>
<dt>1</dt> <dd>Show tab line only if more than one tab is open</dd> <dt>1</dt> <dd>Show tab line only if more than one tab is open</dd>
<dt>2</dt> <dd>Always show tab line</dd> <dt>2</dt> <dd>Always show tab line</dd>

View File

@@ -55,7 +55,7 @@
appear is the one that takes effect. appear is the one that takes effect.
</p> </p>
<dl> <dl dt="width: 6em;">
<dt>\c</dt> <dd>Perform case insensitive search (default if <o>ignorecase</o> is set).</dd> <dt>\c</dt> <dd>Perform case insensitive search (default if <o>ignorecase</o> is set).</dd>
<dt>\C</dt> <dd>Perform case sensitive search</dd> <dt>\C</dt> <dd>Perform case sensitive search</dd>
<dt>\l</dt> <dd>Search only in links, as defined by <o>hinttags</o>. (default if <o>linksearch</o> is set).</dd> <dt>\l</dt> <dd>Search only in links, as defined by <o>hinttags</o>. (default if <o>linksearch</o> is set).</dd>
@@ -66,7 +66,7 @@
Additionally, if the /Find Bar/ extension is installed, the Additionally, if the /Find Bar/ extension is installed, the
following flags may be used, following flags may be used,
</p> </p>
<dl> <dl dt="width: 6em;">
<dt>\r</dt> <dd>Process the entire pattern as a regular expression.</dd> <dt>\r</dt> <dd>Process the entire pattern as a regular expression.</dd>
<dt>\R</dt> <dd>Process the entire pattern as an ordinary string.</dd> <dt>\R</dt> <dd>Process the entire pattern as an ordinary string.</dd>
</dl> </dl>

View File

@@ -197,27 +197,30 @@
<item> <item>
<tags>:styleenable :stylee</tags> <tags>:styleenable :stylee</tags>
<tags>:styenable :stye</tags> <tags>:styenable :stye</tags>
<strut/>
<spec>:styled<oa>isable</oa> <oa>-name=<a>name</a></oa> <oa>-index=<a>index</a></oa> <oa>filter</oa> <oa>css</oa></spec> <spec>:styled<oa>isable</oa> <oa>-name=<a>name</a></oa> <oa>-index=<a>index</a></oa> <oa>filter</oa> <oa>css</oa></spec>
<description> <description>
<p>Enable any matching styles. Arguments are the same as for <ex>:delstyle</ex>.</p> <p>Enable any matching styles. Arguments are the same as for <ex>:delstyle</ex></p>
</description> </description>
</item> </item>
<item> <item>
<tags>:styledisable :styled</tags> <tags>:styledisable :styled</tags>
<tags>:stydisable :styd</tags> <tags>:stydisable :styd</tags>
<strut/>
<spec>:stylee<oa>nable</oa> <oa>-name=<a>name</a></oa> <oa>-index=<a>index</a></oa> <oa>filter</oa> <oa>css</oa></spec> <spec>:stylee<oa>nable</oa> <oa>-name=<a>name</a></oa> <oa>-index=<a>index</a></oa> <oa>filter</oa> <oa>css</oa></spec>
<description> <description>
<p>Disable any matching styles. Arguments are the same as for <ex>:delstyle</ex>.</p> <p>Disable any matching styles. Arguments are the same as for <ex>:delstyle</ex></p>
</description> </description>
</item> </item>
<item> <item>
<tags>:styletoggle :stylet</tags> <tags>:styletoggle :stylet</tags>
<tags>:stytoggle :styt</tags> <tags>:stytoggle :styt</tags>
<strut/>
<spec>:stylet<oa>oggle</oa> <oa>-name=<a>name</a></oa> <oa>-index=<a>index</a></oa> <oa>filter</oa> <oa>css</oa></spec> <spec>:stylet<oa>oggle</oa> <oa>-name=<a>name</a></oa> <oa>-index=<a>index</a></oa> <oa>filter</oa> <oa>css</oa></spec>
<description> <description>
<p>Toggle any matching styles. Arguments are the same as for <ex>:delstyle</ex>.</p> <p>Toggle any matching styles. Arguments are the same as for <ex>:delstyle</ex></p>
</description> </description>
</item> </item>

View File

@@ -40,7 +40,7 @@
<p>A buffer may be marked with one of the following indicators:</p> <p>A buffer may be marked with one of the following indicators:</p>
<dl> <dl dt="width: 6em;">
<dt><hl key="Indicator">%</hl></dt><dd>The current buffer</dd> <dt><hl key="Indicator">%</hl></dt><dd>The current buffer</dd>
<dt><hl key="Indicator">#</hl></dt><dd>The alternate buffer for <ex>:e #</ex> and <k name="C-^"/></dd> <dt><hl key="Indicator">#</hl></dt><dd>The alternate buffer for <ex>:e #</ex> and <k name="C-^"/></dd>
</dl> </dl>

View File

@@ -122,16 +122,15 @@
</p> </p>
<p tag="private-mode porn-mode"> <p tag="private-mode porn-mode">
<strut/>
&dactyl.appName; fully supports &dactyl.host;'s private browsing mode. &dactyl.appName; fully supports &dactyl.host;'s private browsing mode.
When in private browsing mode, no data other than Bookmarks and QuickMarks When in private browsing mode, no data other than Bookmarks and QuickMarks
are written to disk. Further, upon exiting private mode, all new data, are written to disk. Further, upon exiting private mode, all newly
including <t>command-line</t> history, local and URL marks, and macros, accumulated data, including <t>command-line</t> history, local and URL
are purged. For more information, see <o>private</o>. marks, and macros, are purged from memory. For more information, see
<o>private</o>.
</p> </p>
<p tag="sanitizing clearing-data"> <p tag="sanitizing clearing-data">
<strut/>
In addition to private mode, &dactyl.appName; provides a comprehensive In addition to private mode, &dactyl.appName; provides a comprehensive
facility for clearing any potentially sensitive data generated by either facility for clearing any potentially sensitive data generated by either
&dactyl.appName; or &dactyl.host;. It directly integrates with &dactyl.appName; or &dactyl.host;. It directly integrates with

View File

@@ -21,6 +21,13 @@
* Multiple Ex commands may now be separated by | * Multiple Ex commands may now be separated by |
* Command-line is now hidden by default. Added C and M to * Command-line is now hidden by default. Added C and M to
'guioptions'. '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: * JavaScript completion improvements, including:
- The prototype of the function whose arguments are currently - The prototype of the function whose arguments are currently
being typed is displayed during completion. being typed is displayed during completion.
@@ -48,7 +55,6 @@
* IMPORTANT: 'guioptions' default value has changed. * IMPORTANT: 'guioptions' default value has changed.
* IMPORTANT: 'mapleader' is now an option rather than a :let * IMPORTANT: 'mapleader' is now an option rather than a :let
variable. variable.
* Added g; continued extended hint mode and removed ;F
* Added "bookmarks", "diverted", and "links" to 'activate' * Added "bookmarks", "diverted", and "links" to 'activate'
option option
* Added 'altwildmode' and <A-Tab> command-line key binding. * Added 'altwildmode' and <A-Tab> command-line key binding.
@@ -59,8 +65,6 @@
* Added -keyword, -tags, -title to :delbmarks. * Added -keyword, -tags, -title to :delbmarks.
* Added "passwords" and "venkman" dialogs to :dialog. * Added "passwords" and "venkman" dialogs to :dialog.
* Added :extupdate command * Added :extupdate command
* Added 'hintkeys' option.
* Added "transliterated" option to 'hintmatching'.
* Replaced 'focuscontent' with 'strictfocus'. * Replaced 'focuscontent' with 'strictfocus'.
* Changed 'urlseparator' default value to '|' * Changed 'urlseparator' default value to '|'
* Added 'wildanchor' option. * Added 'wildanchor' option.