diff options
author | anekos | 2009-02-02 09:28:21 +0000 |
---|---|---|
committer | anekos | 2009-02-02 09:28:21 +0000 |
commit | 2901164feecc922c81e37ddaf223c7447e08816d (patch) | |
tree | 7ecfd12365e0a6acc0d36925da8530302034b915 /umihara.js | |
parent | 997a02c0ea26c1e11d5302252e3a200f13ca2418 (diff) | |
download | vimperator-plugins-2901164feecc922c81e37ddaf223c7447e08816d.tar.bz2 |
引数省略時のバグ修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29434 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'umihara.js')
-rw-r--r-- | umihara.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -39,7 +39,7 @@ let PLUGIN_INFO = <name lang="ja">外国為替換算</name> <description>for exchangeconvertion</description> <description lang="ja">為替換算をします</description> - <version>1.1</version> + <version>1.1.1</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -193,8 +193,17 @@ let PLUGIN_INFO = let as = args; resultBuffer = ''; liberator.echo('<<Results>>\n') - for (let i = 1, l = args.length - 1; i < l; i++) { + if (as.length == 0) + as.push('1'); + while (as.length < 3) + as.push('-'); + for (let i = 1, l = as.length - 1; i < l; i++) { let [value, from, to] = [as[0], as[i], l == i ? '-' : as[l]]; + liberator.log({ + value: value, + from: from, + to: to + }) value = eval(value); kawase(value, args.bang, from, to); } |