summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-03-21 13:19:57 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-03-21 13:19:57 +0000
commitc5fa31994340c8bb7e779fe1a175ac4d0d262143 (patch)
tree036bb1e16451e501c25b9aaa464249baf9024674 /usr.bin/tmux
parente276c8b448ca2534b8f2c9942d2e1b00a44770ec (diff)
Set end position correctly, GitHub issue 2129 from Anindya Mukherjee.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/window-copy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c
index 6e317cfb344..33ed4b300d5 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.257 2020/03/20 20:12:39 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.258 2020/03/21 13:19:56 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1566,12 +1566,12 @@ window_copy_cmd_select_line(struct window_copy_cmd_state *cs)
window_copy_cursor_start_of_line(wme);
data->selrx = data->cx;
data->selry = screen_hsize(data->backing) + data->cy - data->oy;
+ data->endselrx = window_copy_find_length(wme, data->selry);
+ data->endselry = data->selry;
window_copy_start_selection(wme);
for (; np > 1; np--)
window_copy_cursor_down(wme, 0);
window_copy_cursor_end_of_line(wme);
- data->endselrx = data->cx;
- data->endselry = screen_hsize(data->backing) + data->cy - data->oy;
return (WINDOW_COPY_CMD_REDRAW);
}