From 2901164feecc922c81e37ddaf223c7447e08816d Mon Sep 17 00:00:00 2001
From: anekos
Date: Mon, 2 Feb 2009 09:28:21 +0000
Subject: 引数省略時のバグ修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29434 d0d07461-0603-4401-acd4-de1884942a52
---
umihara.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
(limited to 'umihara.js')
diff --git a/umihara.js b/umihara.js
index 732945c..d5f950d 100644
--- a/umihara.js
+++ b/umihara.js
@@ -39,7 +39,7 @@ let PLUGIN_INFO =
外国為替換算
for exchangeconvertion
為替換算をします
- 1.1
+ 1.1.1
anekos
new BSD License (Please read the source code comments of this plugin)
修正BSDライセンス (ソースコードのコメントを参照してください)
@@ -193,8 +193,17 @@ let PLUGIN_INFO =
let as = args;
resultBuffer = '';
liberator.echo('<>\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);
}
--
cgit v1.2.3