mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-16 10:15:46 +01:00
Make :rehash|echomsg "foo" work as expected.
--HG-- branch : groups
This commit is contained in:
@@ -78,7 +78,7 @@ var AutoCommands = Module("autocommands", {
|
|||||||
|
|
||||||
hives: Group.SubGroup("autocmd", AutoCmdHive),
|
hives: Group.SubGroup("autocmd", AutoCmdHive),
|
||||||
|
|
||||||
get activeHives() contexts.activeGroups("autocmd").map(function (h) h.autocmd),
|
get activeHives() contexts.activeGroups("autocmd").map(function (h) h.autocmd).filter(function (h) h._store.length),
|
||||||
|
|
||||||
add: deprecated("autocommand.user.add", { get: function add() autocommands.user.closure.add }),
|
add: deprecated("autocommand.user.add", { get: function add() autocommands.user.closure.add }),
|
||||||
get: deprecated("autocommand.user.get", { get: function get() autocommands.user.closure.get }),
|
get: deprecated("autocommand.user.get", { get: function get() autocommands.user.closure.get }),
|
||||||
|
|||||||
@@ -1090,6 +1090,8 @@ var Commands = Module("commands", {
|
|||||||
args.commandString = str.substr(0, len) + args.string;
|
args.commandString = str.substr(0, len) + args.string;
|
||||||
str = args.trailing;
|
str = args.trailing;
|
||||||
yield [command, args];
|
yield [command, args];
|
||||||
|
if (args.break)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
while (str);
|
while (str);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1791,7 +1791,12 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
commands.add(["reh[ash]"],
|
commands.add(["reh[ash]"],
|
||||||
"Reload the " + config.appName + " add-on",
|
"Reload the " + config.appName + " add-on",
|
||||||
function (args) { util.rehash(args); },
|
function (args) {
|
||||||
|
if (args.trailing)
|
||||||
|
JSMLoader.rehashCmd = args.trailing; // Hack.
|
||||||
|
args.break = true;
|
||||||
|
util.rehash(args);
|
||||||
|
},
|
||||||
{
|
{
|
||||||
argCount: "0",
|
argCount: "0",
|
||||||
options: [
|
options: [
|
||||||
@@ -2117,6 +2122,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
dactyl.execute(cmd);
|
dactyl.execute(cmd);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (JSMLoader.rehashCmd)
|
||||||
|
dactyl.execute(JSMLoader.rehashCmd);
|
||||||
|
JSMLoader.rehashCmd = null;
|
||||||
|
|
||||||
dactyl.fullyInitialized = true;
|
dactyl.fullyInitialized = true;
|
||||||
dactyl.triggerObserver("enter", null);
|
dactyl.triggerObserver("enter", null);
|
||||||
autocommands.trigger("Enter", {});
|
autocommands.trigger("Enter", {});
|
||||||
|
|||||||
Reference in New Issue
Block a user