diff options
author | suVene | 2009-01-26 09:42:07 +0000 |
---|---|---|
committer | suVene | 2009-01-26 09:42:07 +0000 |
commit | 09deaf0ad5aeb1a7c9f53ba3db29974a1abe4fd5 (patch) | |
tree | 4f93d91b8caa89620c5ce959d5fe8b2eea0d8cfa /copy.js | |
parent | 6e36a1faaf950ba0e829ad0dc824ed835193335f (diff) | |
download | vimperator-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.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 { |