X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=inline;f=ldisc.c;h=8f653a18f0ee23c74323eb1c83a249f13f87f820;hb=efb6aa4642055383910891f201301298a6bea498;hp=efbb871488d7f0b64972369295349d7fff9c46cb;hpb=a1f3b7a358adaa7c2a98359cd0373aa823eeb14b;p=PuTTY.git diff --git a/ldisc.c b/ldisc.c index efbb8714..8f653a18 100644 --- a/ldisc.c +++ b/ldisc.c @@ -146,6 +146,18 @@ void ldisc_send(void *handle, char *buf, int len, int interactive) */ frontend_keypress(ldisc->frontend); + if (interactive && ldisc->term) { + /* + * Interrupt a paste from the clipboard, if one was in + * progress when the user pressed a key. This is easier than + * buffering the current piece of data and saving it until the + * terminal has finished pasting, and has the potential side + * benefit of permitting a user to cancel an accidental huge + * paste. + */ + term_nopaste(ldisc->term); + } + /* * Less than zero means null terminated special string. */