Fix a regression in the previous release that caused pasting large amounts of text to be duplicated

Fixes #709
This commit is contained in:
Kovid Goyal 2018-07-08 16:25:08 +05:30
parent 4313531432
commit 1d22b75090
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 9 additions and 1 deletions

View File

@ -30,6 +30,9 @@ Changelog
- When drag-scrolling stop the scroll when the mouse button is released.
- Fix a regression in the previous release that caused pasting large amounts
of text to be duplicated (:iss:`709`)
0.11.2 [2018-07-01]
------------------------------

View File

@ -976,7 +976,12 @@ write_to_child(int fd, Screen *screen) {
written = screen->write_buf_used;
}
}
screen->write_buf_used -= written;
if (written) {
screen->write_buf_used -= written;
if (screen->write_buf_used) {
memmove(screen->write_buf, screen->write_buf + written, screen->write_buf_used);
}
}
screen_mutex(unlock, write);
}