aboutsummaryrefslogtreecommitdiffstats
path: root/copy.js
diff options
context:
space:
mode:
authorsuVene2009-01-26 09:42:07 +0000
committersuVene2009-01-26 09:42:07 +0000
commit09deaf0ad5aeb1a7c9f53ba3db29974a1abe4fd5 (patch)
tree4f93d91b8caa89620c5ce959d5fe8b2eea0d8cfa /copy.js
parent6e36a1faaf950ba0e829ad0dc824ed835193335f (diff)
downloadvimperator-plugins-09deaf0ad5aeb1a7c9f53ba3db29974a1abe4fd5.tar.bz2
args が null の時の対応
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29075 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'copy.js')
-rw-r--r--copy.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/copy.js b/copy.js
index 76f5acb..92a059b 100644
--- a/copy.js
+++ b/copy.js
@@ -288,7 +288,8 @@ var exCopyManager = {
copyString = e.toString();
}
} else {
- if (!arg) arg = liberator.globalVariables.copy_templates[0];
+ if (!arg) arg = liberator.globalVariables.copy_templates[0].label;
+
var template = getCopyTemplate(arg) || {value: arg};
if (typeof template.custom == 'function'){
copyString = template.custom.call(this, template.value);
@@ -298,7 +299,9 @@ var exCopyManager = {
copyString = replaceVariable(template.value);
}
}
- util.copyToClipboard(copyString || '');
+
+ if (copyString)
+ util.copyToClipboard(copyString);
if (isError){
liberator.echoerr('CopiedErrorString: `' + copyString + "'");
} else {