mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:37:59 +01:00
Fix :normal. Closes issue #275.
This commit is contained in:
@@ -666,6 +666,8 @@ var CommandLine = Module("commandline", {
|
|||||||
return this.widgets.command = val;
|
return this.widgets.command = val;
|
||||||
return this._lastCommand = val;
|
return this._lastCommand = val;
|
||||||
},
|
},
|
||||||
|
get lastCommand() this._lastCommand || this.command,
|
||||||
|
set lastCommand(val) { this._lastCommand = val },
|
||||||
|
|
||||||
clear: function () {
|
clear: function () {
|
||||||
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
modifiers = modifiers || {};
|
modifiers = modifiers || {};
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
commandline.command = str.replace(/^\s*:\s*/, "");
|
commandline.lastCommand = str.replace(/^\s*:\s*/, "");
|
||||||
let res = true;
|
let res = true;
|
||||||
for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) {
|
for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) {
|
||||||
if (command === null)
|
if (command === null)
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ var Events = Module("events", {
|
|||||||
evt.noremap = !!noremap;
|
evt.noremap = !!noremap;
|
||||||
evt.isMacro = true;
|
evt.isMacro = true;
|
||||||
evt.dactylMode = mode;
|
evt.dactylMode = mode;
|
||||||
|
this.feedingEvent = evt;
|
||||||
|
|
||||||
let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt);
|
let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt);
|
||||||
if (!evt_obj.dactylString && !evt_obj.dactylShift && !mode)
|
if (!evt_obj.dactylString && !evt_obj.dactylShift && !mode)
|
||||||
@@ -318,8 +319,8 @@ var Events = Module("events", {
|
|||||||
if (this.duringFeed.length) {
|
if (this.duringFeed.length) {
|
||||||
let duringFeed = this.duringFeed;
|
let duringFeed = this.duringFeed;
|
||||||
this.duringFeed = [];
|
this.duringFeed = [];
|
||||||
for (let [, evt] in Iterator(duringFeed))
|
for (let [, event] in Iterator(duringFeed))
|
||||||
events.dispatch(evt.originalTarget, evt);
|
events.dispatch(event.originalTarget, event, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1009,7 +1010,7 @@ var Events = Module("events", {
|
|||||||
for (let [i, event] in Iterator(refeed))
|
for (let [i, event] in Iterator(refeed))
|
||||||
if (event.originalTarget) {
|
if (event.originalTarget) {
|
||||||
let evt = events.create(event.originalTarget.ownerDocument, event.type, event);
|
let evt = events.create(event.originalTarget.ownerDocument, event.type, event);
|
||||||
events.dispatch(event.originalTarget, evt, { skipmap: true });
|
events.dispatch(event.originalTarget, evt, { skipmap: true, isMacro: true });
|
||||||
}
|
}
|
||||||
else if (i > 0)
|
else if (i > 0)
|
||||||
events.onKeyPress(event);
|
events.onKeyPress(event);
|
||||||
|
|||||||
Reference in New Issue
Block a user