1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 07:17:59 +01:00

Fix more cross-compartment expando breakage. Also, Die <F1>! Die, die, die!

This commit is contained in:
Kris Maglione
2012-12-20 18:47:32 -08:00
parent 2ec3cb0a46
commit d0e53df525
7 changed files with 17 additions and 27 deletions

View File

@@ -20,7 +20,7 @@ by Kris Maglione, Doug Kearns, et al.
&dactyl.appName; is open source and freely distributable &dactyl.appName; is open source and freely distributable
type :q&lt;<span class="key">Enter</span>> to exit <!----> type :q&lt;<span class="key">Enter</span>> to exit <!---->
type :help&lt;<span class="key">Enter</span>> or &lt;<span class="key">F1</span>> for on-line help type :help&lt;<span class="key">Enter</span>> for on-line help
type :help faq&lt;<span class="key">Enter</span>> for the FAQ page type :help faq&lt;<span class="key">Enter</span>> for the FAQ page
type :help versions&lt;<span class="key">Enter</span>> for version info type :help versions&lt;<span class="key">Enter</span>> for version info
</div> </div>

View File

@@ -2291,7 +2291,7 @@ var ItemList = Class("ItemList", {
DOM(this.nodes.message).empty() DOM(this.nodes.message).empty()
.append(DOM.fromJSON(this.context.message, this.doc)); .append(DOM.fromJSON(this.context.message, this.doc));
if (!this.selectedIdx > this.itemCount) if (this.selectedIdx > this.itemCount)
this.selectedIdx = null; this.selectedIdx = null;
}, },

View File

@@ -661,13 +661,15 @@ var Events = Module("events", {
let duringFeed = this.duringFeed || []; let duringFeed = this.duringFeed || [];
this.duringFeed = []; this.duringFeed = [];
try { try {
if (DOM.Event.feedingEvent) let ourEvent = DOM.Event.feedingEvent;
for (let [k, v] in Iterator(DOM.Event.feedingEvent)) DOM.Event.feedingEvent = null;
if (ourEvent)
for (let [k, v] in Iterator(ourEvent))
if (!(k in event)) if (!(k in event))
event[k] = v; event[k] = v;
DOM.Event.feedingEvent = null;
let key = DOM.Event.stringify(event); let key = DOM.Event.stringify(ourEvent || event);
event.dactylString = key;
// Hack to deal with <BS> and so forth not dispatching input // Hack to deal with <BS> and so forth not dispatching input
// events // events

View File

@@ -159,7 +159,7 @@ var ProcessorStack = Class("ProcessorStack", {
if (this.timer) if (this.timer)
this.timer.cancel(); this.timer.cancel();
let key = DOM.Event.stringify(event); let key = event.dactylString || DOM.Event.stringify(event);
this.events.push(event); this.events.push(event);
if (this.keyEvents) if (this.keyEvents)
this.keyEvents.push(event); this.keyEvents.push(event);
@@ -233,7 +233,7 @@ var KeyProcessor = Class("KeyProcessor", {
append: function append(event) { append: function append(event) {
this.events.push(event); this.events.push(event);
let key = DOM.Event.stringify(event); let key = event.dactylString || DOM.Event.stringify(event);
if (this.wantCount && !this.command && if (this.wantCount && !this.command &&
(this.countStr ? /^[0-9]$/ : /^[1-9]$/).test(key)) (this.countStr ? /^[0-9]$/ : /^[1-9]$/).test(key))

View File

@@ -24,9 +24,8 @@
</p> </p>
<xml-block><item> <xml-block><item>
<tags>&lt;F1> :help :h help</tags> <tags>:help :h help</tags>
<spec>:h<oa>elp</oa> <oa>subject</oa></spec> <spec>:h<oa>elp</oa> <oa>subject</oa></spec>
<spec>&lt;F1></spec>
<description> <description>
<p> <p>
Open the help page. The default page, as specified by <o>helpfile</o> is shown Open the help page. The default page, as specified by <o>helpfile</o> is shown
@@ -37,11 +36,11 @@
</item></xml-block> </item></xml-block>
<p> <p>
creates a new help section for the command <ex>:help</ex> and for creates a new help section for the command <ex>:help</ex>. It
the related key binding, <k name="F1"/>. It also creates help tags also creates help tags for the command, its shortcuts, the key
for the command, its shortcuts, the key binding, and the general binding, and the general topic, help. These tags enable
topic, help. These tags enable linking to this section from linking to this section from other mentions of the topic and
other mentions of the topic and from the <ex>:help</ex> command. from the <ex>:help</ex> command.
</p> </p>
<h3 tag="help-tags help-xml">Help tags</h3> <h3 tag="help-tags help-xml">Help tags</h3>

View File

@@ -217,7 +217,7 @@ var Addon = Class("Addon", {
while (node.firstChild) while (node.firstChild)
node.removeChild(node.firstChild); node.removeChild(node.firstChild);
DOM(node).append(isArray(xml) || isXML(xml) ? xml : DOM.DOMString(xml)); DOM(node).append(isArray(xml) ? xml : DOM.DOMString(xml));
} }
update("name", template.icon({ icon: this.iconURL }, this.name)); update("name", template.icon({ icon: this.iconURL }, this.name));

View File

@@ -445,17 +445,6 @@ var Help = Module("Help", {
context.keys = { text: 0, description: function () "all" }; context.keys = { text: 0, description: function () "all" };
}; };
}, },
mappings: function initMappings(dactyl, modules, window) {
const { help, mappings, modes } = modules;
mappings.add([modes.MAIN], ["<open-help>", "<F1>"],
"Open the introductory help page",
function () { help.help(); });
mappings.add([modes.MAIN], ["<open-single-help>", "<A-F1>"],
"Open the single, consolidated help page",
function () { modules.ex.helpall(); });
},
javascript: function initJavascript(dactyl, modules, window) { javascript: function initJavascript(dactyl, modules, window) {
modules.JavaScript.setCompleter([modules.help.exportHelp], modules.JavaScript.setCompleter([modules.help.exportHelp],
[function (context, args) overlay.activeModules.completion.file(context)]); [function (context, args) overlay.activeModules.completion.file(context)]);