1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-13 00:57:33 -05:00

Revamp the terminal paste mechanism using toplevel callbacks.

I've removed the ad-hoc front-end bodgery in the Windows and GTK ports
to arrange for term_paste to be called at the right moments, and
instead, terminal.c itself deals with knowing when to send the next
chunk of pasted data using a combination of timers and the new
top-level callback mechanism.

As a happy side effect, it's now all in one place so I can actually
understand what it's doing! It turns out that what all that confusing
code was up to is: send a line of pasted data, and delay sending the
next line until either a CR or LF is returned from the server
(typically indicating that the pasted text has been received and
echoed) or 450ms elapse, whichever comes first.

[originally from svn r10020]
This commit is contained in:
Simon Tatham
2013-08-17 16:06:12 +00:00
parent 75c79e318f
commit 7be9af74ec
5 changed files with 81 additions and 69 deletions

View File

@ -222,8 +222,8 @@ struct terminal_tag {
int attr_mask;
wchar_t *paste_buffer;
int paste_len, paste_pos, paste_hold;
long last_paste;
int paste_len, paste_pos;
Terminal *paste_timer_ctx;
void (*resize_fn)(void *, int, int);
void *resize_ctx;