diff --git a/docs/changelog.rst b/docs/changelog.rst index e467dbc41..13e0373cf 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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] ------------------------------ diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 65c6d19ce..96214febb 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -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); }