From c8bd42de160902a3efebf021b660fd230ca08ca2 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 28 Oct 2024 08:16:51 +0000 Subject: [PATCH] Match tab cells when searching, from Alexander Arch in GitHub issue 4201. --- window-copy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/window-copy.c b/window-copy.c index 7a2734ac..8542092e 100644 --- a/window-copy.c +++ b/window-copy.c @@ -3082,6 +3082,9 @@ window_copy_search_compare(struct grid *gd, u_int px, u_int py, grid_get_cell(sgd, spx, 0, &sgc); sud = &sgc.data; + if (*sud->data == '\t' && sud->size == 1 && gc.flags & GRID_FLAG_TAB) + return (1); + if (ud->size != sud->size || ud->width != sud->width) return (0);