mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Don't strip add newline if only copying part of wrapped line. Problem spotted
by and fix from Micah Cowan.
This commit is contained in:
parent
44ded35d5d
commit
d285f7fd4d
@ -1038,7 +1038,7 @@ window_copy_copy_line(struct window_pane *wp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Only add a newline if the line wasn't wrapped. */
|
/* Only add a newline if the line wasn't wrapped. */
|
||||||
if (!wrapped) {
|
if (!wrapped || ex != xx) {
|
||||||
*buf = xrealloc(*buf, 1, (*off) + 1);
|
*buf = xrealloc(*buf, 1, (*off) + 1);
|
||||||
(*buf)[(*off)++] = '\n';
|
(*buf)[(*off)++] = '\n';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user