mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 01:34:11 +01:00
Fix live update issues.
This commit is contained in:
@@ -721,7 +721,7 @@ var CommandLine = Module("commandline", {
|
||||
highlightGroup = highlightGroup || this.HL_NORMAL;
|
||||
|
||||
if (flags & this.APPEND_TO_MESSAGES) {
|
||||
let message = isObject(data) && !isinstance(data, _) ? data : { message: String(data) };
|
||||
let message = isObject(data) ? data : { message: String(data) };
|
||||
this._messageHistory.add(update({ highlight: highlightGroup }, message));
|
||||
data = message.message;
|
||||
}
|
||||
|
||||
@@ -337,11 +337,14 @@ var Mappings = Module("mappings", {
|
||||
* @param {Object} extra An optional extra configuration hash.
|
||||
* @optional
|
||||
*/
|
||||
add: function () {
|
||||
util.assert(util.isDactyl(Components.stack.caller),
|
||||
"User scripts may not add builtin mappings. Please use group.mappings.add instead.");
|
||||
add: function add() {
|
||||
let group = this.builtin;
|
||||
if (!util.isDactyl(Components.stack.caller)) {
|
||||
deprecated.warn(add, "mappings.add", "group.mappings.add");
|
||||
group = this.user;
|
||||
}
|
||||
|
||||
let map = this.builtin.add.apply(this.builtin, arguments);
|
||||
let map = group.add.apply(group, arguments);
|
||||
map.definedAt = contexts.getCaller(Components.stack.caller);
|
||||
return map;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user