1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Make calling term_nopaste() a cross-platform feature.

It was one of those things that went in ages ago on Windows and never
got replicated in the Unix front end. And it needn't be: ldisc.c is a
perfect place to put it, since it knows which of the data it's sending
is based on a keystroke and which is automatically generated, and it
also has access to the terminal context. So now a keypress can
interrupt a runaway paste on all platforms.

[originally from svn r10025]
This commit is contained in:
Simon Tatham
2013-08-17 16:06:40 +00:00
parent 9d5903b163
commit 4db5c2899f
4 changed files with 25 additions and 17 deletions

View File

@ -3051,14 +3051,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
return DefWindowProc(hwnd, message, wParam, lParam);
if (len != 0) {
/*
* Interrupt an ongoing paste. I'm not sure
* this is sensible, but for the moment it's
* preferable to having to faff about buffering
* things.
*/
term_nopaste(term);
/*
* We need not bother about stdin backlogs
* here, because in GUI PuTTY we can't do
@ -4608,13 +4600,6 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
if (r > 0) {
WCHAR keybuf;
/*
* Interrupt an ongoing paste. I'm not sure this is
* sensible, but for the moment it's preferable to
* having to faff about buffering things.
*/
term_nopaste(term);
p = output;
for (i = 0; i < r; i++) {
wchar_t wch = keys_unicode[i];