aboutsummaryrefslogtreecommitdiffstats
path: root/maine_coon.js
diff options
context:
space:
mode:
authoranekos2010-03-01 12:23:26 +0000
committeranekos2010-03-01 12:23:26 +0000
commitff64b9fe17d0ee3a78ec581d46b6b4e8be727879 (patch)
tree4ef093b85ed1318aeff6580ccca51db465d7923f /maine_coon.js
parentfa216986e2af1547223738b81d1153a7db71aef2 (diff)
downloadvimperator-plugins-ff64b9fe17d0ee3a78ec581d46b6b4e8be727879.tar.bz2
commandline.input が隠れてしまわないようにした。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36892 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'maine_coon.js')
-rw-r--r--maine_coon.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/maine_coon.js b/maine_coon.js
index 0bee38c..554d3fa 100644
--- a/maine_coon.js
+++ b/maine_coon.js
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008-2009, anekos.
+Copyright (c) 2008-2010, anekos.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -38,7 +38,7 @@ let PLUGIN_INFO =
<name lang="ja">メインクーン</name>
<description>Make the screen larger</description>
<description lang="ja">なるべくでかい画面で使えるように</description>
- <version>2.3.0</version>
+ <version>2.3.1</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<minVersion>2.3</minVersion>
<maxVersion>2.3</maxVersion>
@@ -304,6 +304,7 @@ let tagetIDs = (liberator.globalVariables.maine_coon_targets || '').split(/\s+/)
let useEcho = false;
let autoHideCommandLine = false;
+ let inputting = false;
let windowInfo = {};
{
@@ -351,24 +352,35 @@ let tagetIDs = (liberator.globalVariables.maine_coon_targets || '').split(/\s+/)
});
}
+ around(commandline, 'input', function (next, args) {
+ let result = next();
+ inputting = true;
+ return result;
+ });
+
around(commandline, 'open', function (next, args) {
messageBox.collapsed = false;
return next();
});
around(commandline, 'close', function (next, args) {
- if (autoHideCommandLine)
+ if (autoHideCommandLine && !inputting)
messageBox.collapsed = true;
return next();
});
around(commandline._callbacks.submit, modes.EX, function (next, args) {
let r = next();
- if (autoHideCommandLine && !(modes.extended & modes.OUTPUT_MULTILINE))
+ if (autoHideCommandLine && !inputting && !(modes.extended & modes.OUTPUT_MULTILINE))
commandline.close();
return r;
});
+ let (callback = function (next) (inputting = false, next())) {
+ around(commandline._callbacks.submit, modes.PROMPT, callback);
+ around(commandline._callbacks.cancel, modes.PROMPT, callback);
+ }
+
options.add(
['mainecoon'],
'Make big screen like a Maine Coon',