mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-09 01:14:11 +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),
|
||||
|
||||
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 }),
|
||||
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;
|
||||
str = args.trailing;
|
||||
yield [command, args];
|
||||
if (args.break)
|
||||
break;
|
||||
}
|
||||
while (str);
|
||||
},
|
||||
|
||||
@@ -1791,7 +1791,12 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
|
||||
commands.add(["reh[ash]"],
|
||||
"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",
|
||||
options: [
|
||||
@@ -2117,6 +2122,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
dactyl.execute(cmd);
|
||||
});
|
||||
|
||||
if (JSMLoader.rehashCmd)
|
||||
dactyl.execute(JSMLoader.rehashCmd);
|
||||
JSMLoader.rehashCmd = null;
|
||||
|
||||
dactyl.fullyInitialized = true;
|
||||
dactyl.triggerObserver("enter", null);
|
||||
autocommands.trigger("Enter", {});
|
||||
|
||||
Reference in New Issue
Block a user