]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Make `Copy all to Clipboard' copy all non-empty lines from the
authorOwen Dunn <owen@greenend.org.uk>
Wed, 10 Mar 2004 17:11:12 +0000 (17:11 +0000)
committerOwen Dunn <owen@greenend.org.uk>
Wed, 10 Mar 2004 17:11:12 +0000 (17:11 +0000)
scrollback and the terminal to the clipboard, rather than just the
content before the cursor.  Should fix copyall-to-cursor.

[originally from svn r3929]

terminal.c

index cb00ea6e7a475f19a3ab3d91ae79c8292127a687..083b0fb43571cee8221655e02390be823dc9d9c2 100644 (file)
@@ -3799,9 +3799,13 @@ static void clipme(Terminal *term, pos top, pos bottom, int rect, int desel)
 void term_copyall(Terminal *term)
 {
     pos top;
+    pos bottom;
+    tree234 *screen = term->screen;
     top.y = -sblines(term);
     top.x = 0;
-    clipme(term, top, term->curs, 0, TRUE);
+    bottom.y = find_last_nonempty_line(term, screen);
+    bottom.x = term->cols;
+    clipme(term, top, bottom, 0, TRUE);
 }
 
 /*