diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-04-03 05:18:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-04-03 05:18:03 +0000 |
commit | 998192486487ec8088e335dbb51f8ffbe79f9ab2 (patch) | |
tree | 97181d733a1454d534942d1be774b6dad4e27a87 /usr.bin | |
parent | eecd71ed9340b426de343344c94c726a39613662 (diff) |
Check previous line rather than an extra line, from Anindya Mukherjee.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/window-copy.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 05b9eb3afec..d2aa27f03b6 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.264 2020/04/02 17:03:10 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.265 2020/04/03 05:18:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2825,11 +2825,8 @@ window_copy_search_marks(struct window_mode_entry *wme, struct screen *ssp, } } time(&tstart); - py = gd->hsize - data->oy; - if (py > 0) - py--; - for (; py > 0; py--) { - gl = grid_peek_line(gd, py); + for (py = gd->hsize - data->oy; py > 0; py--) { + gl = grid_peek_line(gd, py - 1); if (~gl->flags & GRID_LINE_WRAPPED) break; } |