mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 15:54:13 +01:00
Fix mode name generated for longer names in mapping serialization. Closes issue #565.
--HG-- extra : rebase_source : 115073fae6cf2a15692cac72df976e1eacf5298e
This commit is contained in:
@@ -28,8 +28,11 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
|
||||
"content-document-global-created": function (win, uri) {
|
||||
let top = util.topWindow(win);
|
||||
|
||||
if (top == window)
|
||||
this._triggerLoadAutocmd("PageLoadPre", win.document, win.location.href != "null" ? window.location.href : uri);
|
||||
if (uri == "null")
|
||||
uri = null;
|
||||
|
||||
if (top == window && (win.location.href || uri))
|
||||
this._triggerLoadAutocmd("PageLoadPre", win.document, win.location.href || uri);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1315,7 +1315,10 @@ var Events = Module("events", {
|
||||
},
|
||||
|
||||
keyup: function onKeyUp(event) {
|
||||
this.keyEvents.push(event);
|
||||
if (this.type == "keydown")
|
||||
this.keyEvents.push(event);
|
||||
else
|
||||
this.keyEvents = [];
|
||||
|
||||
let isMacro = event.isMacro || this.feedingEvent && this.feedingEvent.isMacro;
|
||||
if (this.lastKeyFake && !isMacro)
|
||||
|
||||
@@ -663,7 +663,9 @@ var Mappings = Module("mappings", {
|
||||
function uniqueModes(modes) {
|
||||
let chars = [k for ([k, v] in Iterator(modules.modes.modeChars))
|
||||
if (v.every(function (mode) modes.indexOf(mode) >= 0))];
|
||||
return array.uniq(modes.filter(function (m) chars.indexOf(m.char) < 0).concat(chars));
|
||||
return array.uniq(modes.filter(function (m) chars.indexOf(m.char) < 0)
|
||||
.map(function (m) m.name.toLowerCase())
|
||||
.concat(chars));
|
||||
}
|
||||
|
||||
commands.add(["feedkeys", "fk"],
|
||||
|
||||
Reference in New Issue
Block a user