=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.307 retrieving revision 1.308 diff -c -r1.307 -r1.308 *** src/usr.bin/tmux/window-copy.c 2020/12/22 09:22:14 1.307 --- src/usr.bin/tmux/window-copy.c 2020/12/28 09:36:26 1.308 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.307 2020/12/22 09:22:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.308 2020/12/28 09:36:26 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 272,278 **** u_char *searchmark; int searchcount; int searchmore; ! int searchthis; int searchx; int searchy; int searcho; --- 272,278 ---- u_char *searchmark; int searchcount; int searchmore; ! int searchall; int searchx; int searchy; int searcho; *************** *** 396,401 **** --- 396,402 ---- data->searchstr = NULL; } data->searchx = data->searchy = data->searcho = -1; + data->searchall = 1; data->jumptype = WINDOW_COPY_OFF; data->jumpchar = '\0'; *************** *** 2334,2342 **** if (clear != WINDOW_COPY_CMD_CLEAR_NEVER) { window_copy_clear_marks(wme); data->searchx = data->searchy = -1; - } else if (data->searchthis != -1) { - data->searchthis = -1; - action = WINDOW_COPY_CMD_REDRAW; } if (action == WINDOW_COPY_CMD_NOTHING) action = WINDOW_COPY_CMD_REDRAW; --- 2335,2340 ---- *************** *** 2929,2937 **** if (data->timeout) return (0); ! if (wp->searchstr == NULL || wp->searchregex != regex) visible_only = 0; ! else visible_only = (strcmp(wp->searchstr, str) == 0); free(wp->searchstr); wp->searchstr = xstrdup(str); --- 2927,2937 ---- if (data->timeout) return (0); ! if (data->searchall || wp->searchstr == NULL || ! wp->searchregex != regex) { visible_only = 0; ! data->searchall = 0; ! } else visible_only = (strcmp(wp->searchstr, str) == 0); free(wp->searchstr); wp->searchstr = xstrdup(str); *************** *** 3116,3122 **** if (!visible_only) { if (stopped) { - data->searchthis = -1; if (nfound > 1000) data->searchcount = 1000; else if (nfound > 100) --- 3116,3121 ---- *************** *** 3127,3136 **** data->searchcount = -1; data->searchmore = 1; } else { - if (which != -1) - data->searchthis = 1 + nfound - which; - else - data->searchthis = -1; data->searchcount = nfound; data->searchmore = 0; } --- 3126,3131 ---- *************** *** 3366,3380 **** if (data->searchcount == -1) { size = xsnprintf(hdr, sizeof hdr, "[%u/%u]", data->oy, hsize); ! } else if (data->searchthis == -1) { size = xsnprintf(hdr, sizeof hdr, "(%d%s results) [%u/%u]", data->searchcount, data->searchmore ? "+" : "", data->oy, hsize); - } else { - size = xsnprintf(hdr, sizeof hdr, - "(%d/%d results) [%u/%u]", data->searchthis, - data->searchcount, data->oy, hsize); } } if (size > screen_size_x(s)) --- 3361,3371 ---- if (data->searchcount == -1) { size = xsnprintf(hdr, sizeof hdr, "[%u/%u]", data->oy, hsize); ! } else { size = xsnprintf(hdr, sizeof hdr, "(%d%s results) [%u/%u]", data->searchcount, data->searchmore ? "+" : "", data->oy, hsize); } } if (size > screen_size_x(s))