1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 22:08:00 +01:00

refactored some yanking code

This commit is contained in:
Martin Stubenschrott
2008-01-05 23:31:07 +00:00
parent 642ac2ba27
commit 43038f7566
5 changed files with 13 additions and 28 deletions

View File

@@ -111,11 +111,14 @@ const vimperator = (function () //{{{
}
},
copyToClipboard: function (str)
copyToClipboard: function (str, verbose)
{
var clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper);
clipboardHelper.copyString(str);
if (verbose)
vimperator.echo("Yanked " + str, vimperator.commandline.FORCE_SINGLELINE);
},
execute: function (str, modifiers)