1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-28 23:34:49 -05:00

Speed up clipboard copies.

Copying large scrollback buffers to the clipboard can take a long time,
up to several minutes. Doubling the size of the clipboard copy buffer
when more space is needed, instead of just adding a small constant size,
significantly speeds up clipboard copies of large scrollback buffers.
This commit is contained in:
Jeff Westfahl 2016-06-27 09:58:16 -05:00
parent 7b9ad09006
commit 5f3160d186

View File

@ -5445,7 +5445,7 @@ typedef struct {
static void clip_addchar(clip_workbuf *b, wchar_t chr, int attr)
{
if (b->bufpos >= b->buflen) {
b->buflen += 128;
b->buflen *= 2;
b->textbuf = sresize(b->textbuf, b->buflen, wchar_t);
b->textptr = b->textbuf + b->bufpos;
b->attrbuf = sresize(b->attrbuf, b->buflen, int);