aboutsummaryrefslogtreecommitdiffstats
path: root/maine_coon.js
diff options
context:
space:
mode:
authoranekos2011-05-01 02:49:37 +0900
committeranekos2011-05-01 02:49:37 +0900
commit25f8e9842c02e78dd5166f9584ae2038c636c861 (patch)
treee26ba3efce0f66449c2af99cda98b6dac793436d /maine_coon.js
parentf4f3822cb92dbf7e94a6766eea0c094ecda70186 (diff)
downloadvimperator-plugins-25f8e9842c02e78dd5166f9584ae2038c636c861.tar.bz2
Fix: commandline focusing
Diffstat (limited to 'maine_coon.js')
-rw-r--r--maine_coon.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/maine_coon.js b/maine_coon.js
index 33b112a..ad0023f 100644
--- a/maine_coon.js
+++ b/maine_coon.js
@@ -38,7 +38,7 @@ let PLUGIN_INFO =
<name lang="ja">メインクーン</name>
<description>Make the screen larger</description>
<description lang="ja">なるべくでかい画面で使えるように</description>
- <version>2.6.3</version>
+ <version>2.6.5</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<minVersion>3.0</minVersion>
<updateURL>https://github.com/vimpr/vimperator-plugins/raw/master/maine_coon.js</updateURL>
@@ -330,8 +330,18 @@ let PLUGIN_INFO =
}
})();
+ function makeTimeoutDelay (f, n) {
+ if (typeof n === 'undefined')
+ n = 1;
+
+ if (n > 1)
+ f = makeTimeoutDelay(f, n - 1);
+
+ return function () setTimeout(f, 10);
+ }
+
function focusToCommandline ()
- setTimeout(function () commandlineBox.inputField.focus(), 0);
+ commandlineBox.inputField.focus();
let useEcho = false;
@@ -378,16 +388,16 @@ let PLUGIN_INFO =
}
U.around(commandline, 'input', function (next, args) {
- bottomBar.collapsed = false;
let result = next();
inputting = true;
+ bottomBar.collapsed = false;
focusToCommandline();
return result;
}, true);
U.around(commandline, 'open', function (next, args) {
- bottomBar.collapsed = false;
let result = next();
+ bottomBar.collapsed = false;
focusToCommandline();
return result;
}, true);