vimperator-labs icon indicating copy to clipboard operation
vimperator-labs copied to clipboard

Cannot copy message output

Open SammysHP opened this issue 9 years ago • 1 comments

Issue type:
  • Bug report
Version:
Vimperator:	3.15.0.20161020130606 (created: 2016/10/20 13:06:06)
Firefox:	Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Description:

Output of commands like :version cannot be copied to clipboard. It works if you select the text first. I remember that Y copied the complete text previously.

Steps to reproduce:
  • Execute :version
  • Press ShiftY as explained in the help

SammysHP avatar Dec 04 '16 13:12 SammysHP

I tried this, but the result is not what I expected (too much whitespace because all HTML was converted to pure text of course).

diff --git a/common/content/commandline.js b/common/content/commandline.js
index e44dd3a0..09f3e4ec 100644
--- a/common/content/commandline.js
+++ b/common/content/commandline.js
@@ -989,7 +989,7 @@ const CommandLine = Module("commandline", {
                 if (sel)
                     util.copyToClipboard(sel, false);
                 else
-                    showHelp = true;
+                    util.copyToClipboard(win.document.body.textContent, false);
                 break;
             // unmapped key -> show Help
             default:

SammysHP avatar Jan 31 '17 08:01 SammysHP