From 309b605230114a2cbd8a083d053d2efa3b6b9cb9 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 16 May 2020 16:03:31 +0000 Subject: Fix next-matching-bracket logic, from Chris Barber. --- usr.bin/tmux/window-copy.c | 8 ++++---- 1 file 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 @@ -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; } -- cgit v1.2.3