From 79a9a7b931780b83add9d296a0dfc3745d4f0996 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 9 May 2020 16:14:45 +0100 Subject: [PATCH] Fix next-matching-bracket logic, from Chris Barber. --- window-copy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/window-copy.c b/window-copy.c index f500a65e..4104d2ad 100644 --- a/window-copy.c +++ b/window-copy.c @@ -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; }