diff --git a/common/bootstrap.js b/common/bootstrap.js index eaa62362..011edd14 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -43,7 +43,7 @@ let components = {}; let getURI = null; function startup(data, reason) { - dump("dactyl: bootstrap: startup\n"); + dump("dactyl: bootstrap: startup " + reasonToString(reason) + "\n"); basePath = data.installPath; if (!initialized) { @@ -180,11 +180,13 @@ function init() { } function shutdown(data, reason) { - dump("dactyl: bootstrap: shutdown\n"); - services.observer.notifyObservers(null, "dactyl-cleanup", null); - for (let factory in values(components)) - // TODO: Categories; - factory.unregister(); + dump("dactyl: bootstrap: shutdown " + reasonToString(reason) + "\n"); + if (reason != APP_SHUTDOWN) { + services.observer.notifyObservers(null, "dactyl-cleanup", null); + for (let factory in values(components)) + // TODO: Categories; + factory.unregister(); + } } function reasonToString(reason) { @@ -196,6 +198,6 @@ function reasonToString(reason) { return name; } -function install(data, reason) { dump("dactyl: bootstrap: install\n") } -function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall\n") } +function install(data, reason) { dump("dactyl: bootstrap: install " + reasonToString(reason) + "\n") } +function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall " + reasonToString(reason) + "\n") } diff --git a/common/content/commandline.js b/common/content/commandline.js index 3454f0e0..65452b92 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -137,23 +137,8 @@ const CommandWidgets = Class("CommandWidgets", { return this.statusbar; let statusElem = this.statusbar.message; - if (!statusElem.editor) { - util.dump(commandline == window.dactyl.modules.commandline, - window.dactyl.modules.commandline.widgets == this, - commandline.widgets == this); - util.dumpStack(); - - for (let i=0, e = statusElem; e; e = e.parentNode) - util.dump(i++, e == statusline._statusLine.firstChild, - e == statusline.widgets.container, - e); - util.dump(statusElem == statusline.widgets.message); - util.dump(statusline._statusLine.firstChild == statusline.widgets.container); - } - else { - if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth) - return this.commandbar; - } + if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth) + return this.commandbar; return this.activeGroup.mode; } }); diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 6e152bd8..1073d8bc 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -292,10 +292,10 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]) ([^]*?) // 1 (?: (<\[) | // 2 - (< (.*?) >) | // 3 4 + (< ((?:[a-z]-)?[a-z-]*?) >) | // 3 4 (\]>) // 5 ) - ]]>, "gy"); + ]]>, "giy"); while (match = re.exec(macro)) { let [, prefix, open, full, macro, close] = match; end += match[0].length;