diff --git a/content/events.js b/content/events.js index 39a6d3a3..8365d078 100644 --- a/content/events.js +++ b/content/events.js @@ -922,9 +922,9 @@ vimperator.Events = function () //{{{ if (vimperator.config.name == "Muttator") { - // we switch to -- MESSAGE -- mode for muttator, when an HTML document gets focus - if ((win && win.document && win.document instanceof HTMLDocument) || - elem instanceof HTMLAnchorElement) + // we switch to -- MESSAGE -- mode for muttator, when the main HTML widget gets focus + //if ((win && win.document && win.document instanceof HTMLDocument) || + if ((win && win == window.content) || elem instanceof HTMLAnchorElement) { if (vimperator.mode != vimperator.modes.MESSAGE) vimperator.mode = vimperator.modes.MESSAGE; diff --git a/content/options.js b/content/options.js index f05abb52..1f7f3689 100644 --- a/content/options.js +++ b/content/options.js @@ -291,7 +291,7 @@ vimperator.Options = function () //{{{ }); vimperator.commands.add(["pref[erences]", "prefs"], - "Show " + vimperator.config.appName + " Preferences", + "Show " + vimperator.config.hostApplication + " Preferences", function (args, special, count, modifiers) { if (!args) diff --git a/content/ui.js b/content/ui.js index 5d02db34..f81e5a49 100644 --- a/content/ui.js +++ b/content/ui.js @@ -189,11 +189,13 @@ vimperator.CommandLine = function () //{{{ var stylesheet = multilineOutputWidget.contentDocument.createElement("link"); stylesheet.setAttribute("rel", "Stylesheet"); - stylesheet.setAttribute("href", "chrome://vimperator/skin/vimperator.css"); + stylesheet.setAttribute("href", "chrome://" + vimperator.config.name.toLowerCase() + "/skin/vimperator.css"); multilineOutputWidget.contentDocument.getElementsByTagName("head")[0].appendChild(stylesheet); var availableHeight = getBrowser().mPanelContainer != undefined ? getBrowser().mPanelContainer.boxObject.height : getBrowser().boxObject.height; + if (!availableHeight) + availableHeight = 250; var contentHeight = multilineOutputWidget.contentDocument.height; var height = contentHeight < availableHeight ? contentHeight : availableHeight; @@ -515,7 +517,7 @@ vimperator.CommandLine = function () //{{{ return; var key = vimperator.events.toString(event); - // dump("command line handling key: " + key + "\n"); + //vimperator.log("command line handling key: " + key + "\n"); // user pressed ENTER to carry out a command // user pressing ESCAPE is handled in the global onEscape @@ -728,7 +730,6 @@ vimperator.CommandLine = function () //{{{ if (event.type == "keypress") { var key = vimperator.events.toString(event); - vimperator.log(multilineInputWidget.value); if (vimperator.events.isAcceptKey(key)) { var text = multilineInputWidget.value.substr(0, multilineInputWidget.selectionStart); @@ -778,7 +779,8 @@ vimperator.CommandLine = function () //{{{ switch (key) { case "": - return; // handled globally in events.js:onEscape() + closeWindow = true; + break; // handled globally in events.js:onEscape() case ":": vimperator.commandline.open(":", "", vimperator.modes.EX);