diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 16:03:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 16:03:31 +0000 |
commit | 309b605230114a2cbd8a083d053d2efa3b6b9cb9 (patch) | |
tree | 9ed2cf8e3074943b6523c487e5a95d619ce44c2c | |
parent | 9c0c7cc2a4495d9a666bc12b72f8ab5eea3fe1ce (diff) |
Fix next-matching-bracket logic, from Chris Barber.
-rw-r--r-- | usr.bin/tmux/window-copy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 02d7738d419..218f50bebfd 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.285 2020/05/16 15:49:20 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.286 2020/05/16 16:03:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1365,9 +1365,9 @@ window_copy_cmd_next_matching_bracket(struct window_copy_cmd_state *cs) px = data->cx; py = screen_hsize(s) + data->cy - data->oy; grid_get_cell(s->grid, px, py, &gc); - if (gc.data.size != 1 || - (gc.flags & GRID_FLAG_PADDING) || - strchr(close, *gc.data.data) == NULL) + if (gc.data.size == 1 && + (~gc.flags & GRID_FLAG_PADDING) && + strchr(close, *gc.data.data) != NULL) window_copy_scroll_to(wme, sx, sy); break; } |