From: simon Date: Sun, 10 Mar 2013 11:04:07 +0000 (+0000) Subject: Fix a bug in which terminal output received from the session could be X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/68b421ede33e5404a02a8db5fa0299ca2c9f2dcb Fix a bug in which terminal output received from the session could be 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 --- diff --git a/terminal.c b/terminal.c index 171db039..113edc4f 100644 --- a/terminal.c +++ b/terminal.c @@ -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)