Don't strip add newline if only copying part of wrapped line. Problem spotted

by and fix from Micah Cowan.
pull/1/head
Nicholas Marriott 2010-02-17 20:58:24 +00:00
parent 44ded35d5d
commit d285f7fd4d
1 changed files with 1 additions and 1 deletions

View File

@ -1038,7 +1038,7 @@ window_copy_copy_line(struct window_pane *wp,
}
/* Only add a newline if the line wasn't wrapped. */
if (!wrapped) {
if (!wrapped || ex != xx) {
*buf = xrealloc(*buf, 1, (*off) + 1);
(*buf)[(*off)++] = '\n';
}