]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Remove the timed part of the terminal paste mechanism.
authorSimon Tatham <anakin@pobox.com>
Sun, 15 Sep 2013 14:05:38 +0000 (14:05 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 15 Sep 2013 14:05:38 +0000 (14:05 +0000)
commitb961cfaa8dbb41d971fe699a04f4838b8ea64d47
treea6b6940f870308ec850765c198915421e03d9d14
parent5c4ce2fadf23bff6f38155df44b5d6040cf80d26
Remove the timed part of the terminal paste mechanism.

In r10020 I carefully reimplemented using timing.c and callback.c the
same policy for large pastes that the previous code appeared to be
implementing ad-hoc, which included a 450ms delay between sending
successive lines of pasted text if no visible acknowledgment of the
just-sent line (in the form of a \n or \r) came back from the
application.

However, it turns out that that *wasn't* what the old code was doing.
It *would* have done that, but for the bug that it never actually set
the 'last_paste' variable, and never has done since it was first
introduced way back in r516! So the policy I thought had been in force
forever has in fact only been in force since I unwittingly fixed that
bug in r10020 - and it turns out to be a bad idea, breaking pastes
into vi in particular.

So I've removed the timed paste code completely, on the basis that
it's never actually worked and nobody seems to have been unhappy about
that. Now we still break large pastes into separate lines and send
them in successive top-level callbacks, and the user can still press a
key to interrupt a paste if they manage to catch it still going on,
but there's no attempted *delay* any more.

(It's possible that what I *really* ought to be doing is calling
back->sendbuffer() to see whether the backend is consuming the data
pasted so far, and if not, deferring the rest of the paste until the
send buffer becomes smaller. Then we could have pasting be delayed by
back-pressure from the recipient, and still manually interruptible
during that delay, but not have it delayed by anything else. But what
we have here should at least manage to be equivalent to the *actual*
rather than the intended old policy.)

[originally from svn r10041]
[r516 == 0d5d39064a0d078af47e3158313dd2b82bfd167c]
[r10020 == 7be9af74ec8b97f948d6b3d67ebaf1a97138da33]
terminal.c
terminal.h