From ff64b9fe17d0ee3a78ec581d46b6b4e8be727879 Mon Sep 17 00:00:00 2001
From: anekos
Date: Mon, 1 Mar 2010 12:23:26 +0000
Subject: commandline.input が隠れてしまわないようにした。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36892 d0d07461-0603-4401-acd4-de1884942a52
---
maine_coon.js | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
(limited to 'maine_coon.js')
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 =
メインクーン
Make the screen larger
なるべくでかい画面で使えるように
- 2.3.0
+ 2.3.1
anekos
2.3
2.3
@@ -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',
--
cgit v1.2.3