diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-02-17 20:58:25 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-02-17 20:58:25 +0000 |
commit | b8da1c5086fbce6035ac4bffc375a4c492435f31 (patch) | |
tree | c121ae0bd0b24ffa3895d61c770350c068e0135d /usr.bin/tmux/window-copy.c | |
parent | cb6be95ae74a96973efc6c14b8ace9478dd32b63 (diff) |
Don't strip add newline if only copying part of wrapped line. Problem spotted
by and fix from Micah Cowan.
Diffstat (limited to 'usr.bin/tmux/window-copy.c')
-rw-r--r-- | usr.bin/tmux/window-copy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 0d150de53c4..9e143204ae3 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.43 2010/02/11 20:39:40 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.44 2010/02/17 20:58:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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'; } |