Fix a bug in which terminal output received from the session could be
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 10 Mar 2013 11:04:07 +0000 (11:04 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 10 Mar 2013 11:04:07 +0000 (11:04 +0000)
buffered in terminal.c indefinitely and only released when further
output turned up.

Arose because we suppress the call to term_out from term_data if a
drag-select is in progress, but when the drag-select ends we weren't
proactively calling term_out to release the buffered data. So if your
session generated some terminal output while you were in mid-select,
_and had stopped by the time you let go of the mouse button_, then the
output would just sit there until released by the next call to
term_data.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9768 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index 171db03..113edc4 100644 (file)
@@ -6002,6 +6002,13 @@ void term_mouse(Terminal *term, Mouse_Button braw, Mouse_Button bcooked,
        request_paste(term->frontend);
     }
 
+    /*
+     * Since terminal output is suppressed during drag-selects, we
+     * should make sure to write any pending output if one has just
+     * finished.
+     */
+    if (term->selstate != DRAGGING)
+        term_out(term);
     term_update(term);
 }
 
@@ -6101,6 +6108,14 @@ void term_deselect(Terminal *term)
 {
     deselect(term);
     term_update(term);
+
+    /*
+     * Since terminal output is suppressed during drag-selects, we
+     * should make sure to write any pending output if one has just
+     * finished.
+     */
+    if (term->selstate != DRAGGING)
+        term_out(term);
 }
 
 int term_ldisc(Terminal *term, int option)