mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 07:08:00 +01:00
fixed MOW for muttator
This commit is contained in:
@@ -922,9 +922,9 @@ vimperator.Events = function () //{{{
|
|||||||
|
|
||||||
if (vimperator.config.name == "Muttator")
|
if (vimperator.config.name == "Muttator")
|
||||||
{
|
{
|
||||||
// we switch to -- MESSAGE -- mode for muttator, when an HTML document gets focus
|
// 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.document && win.document instanceof HTMLDocument) ||
|
||||||
elem instanceof HTMLAnchorElement)
|
if ((win && win == window.content) || elem instanceof HTMLAnchorElement)
|
||||||
{
|
{
|
||||||
if (vimperator.mode != vimperator.modes.MESSAGE)
|
if (vimperator.mode != vimperator.modes.MESSAGE)
|
||||||
vimperator.mode = vimperator.modes.MESSAGE;
|
vimperator.mode = vimperator.modes.MESSAGE;
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ vimperator.Options = function () //{{{
|
|||||||
});
|
});
|
||||||
|
|
||||||
vimperator.commands.add(["pref[erences]", "prefs"],
|
vimperator.commands.add(["pref[erences]", "prefs"],
|
||||||
"Show " + vimperator.config.appName + " Preferences",
|
"Show " + vimperator.config.hostApplication + " Preferences",
|
||||||
function (args, special, count, modifiers)
|
function (args, special, count, modifiers)
|
||||||
{
|
{
|
||||||
if (!args)
|
if (!args)
|
||||||
|
|||||||
@@ -189,11 +189,13 @@ vimperator.CommandLine = function () //{{{
|
|||||||
|
|
||||||
var stylesheet = multilineOutputWidget.contentDocument.createElement("link");
|
var stylesheet = multilineOutputWidget.contentDocument.createElement("link");
|
||||||
stylesheet.setAttribute("rel", "Stylesheet");
|
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);
|
multilineOutputWidget.contentDocument.getElementsByTagName("head")[0].appendChild(stylesheet);
|
||||||
|
|
||||||
var availableHeight = getBrowser().mPanelContainer != undefined ?
|
var availableHeight = getBrowser().mPanelContainer != undefined ?
|
||||||
getBrowser().mPanelContainer.boxObject.height : getBrowser().boxObject.height;
|
getBrowser().mPanelContainer.boxObject.height : getBrowser().boxObject.height;
|
||||||
|
if (!availableHeight)
|
||||||
|
availableHeight = 250;
|
||||||
var contentHeight = multilineOutputWidget.contentDocument.height;
|
var contentHeight = multilineOutputWidget.contentDocument.height;
|
||||||
var height = contentHeight < availableHeight ? contentHeight : availableHeight;
|
var height = contentHeight < availableHeight ? contentHeight : availableHeight;
|
||||||
|
|
||||||
@@ -515,7 +517,7 @@ vimperator.CommandLine = function () //{{{
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var key = vimperator.events.toString(event);
|
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 pressed ENTER to carry out a command
|
||||||
// user pressing ESCAPE is handled in the global onEscape
|
// user pressing ESCAPE is handled in the global onEscape
|
||||||
@@ -728,7 +730,6 @@ vimperator.CommandLine = function () //{{{
|
|||||||
if (event.type == "keypress")
|
if (event.type == "keypress")
|
||||||
{
|
{
|
||||||
var key = vimperator.events.toString(event);
|
var key = vimperator.events.toString(event);
|
||||||
vimperator.log(multilineInputWidget.value);
|
|
||||||
if (vimperator.events.isAcceptKey(key))
|
if (vimperator.events.isAcceptKey(key))
|
||||||
{
|
{
|
||||||
var text = multilineInputWidget.value.substr(0, multilineInputWidget.selectionStart);
|
var text = multilineInputWidget.value.substr(0, multilineInputWidget.selectionStart);
|
||||||
@@ -778,7 +779,8 @@ vimperator.CommandLine = function () //{{{
|
|||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case "<Esc>":
|
case "<Esc>":
|
||||||
return; // handled globally in events.js:onEscape()
|
closeWindow = true;
|
||||||
|
break; // handled globally in events.js:onEscape()
|
||||||
|
|
||||||
case ":":
|
case ":":
|
||||||
vimperator.commandline.open(":", "", vimperator.modes.EX);
|
vimperator.commandline.open(":", "", vimperator.modes.EX);
|
||||||
|
|||||||
Reference in New Issue
Block a user