=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.227 retrieving revision 1.228 diff -c -r1.227 -r1.228 *** src/usr.bin/tmux/window-copy.c 2019/07/05 07:52:27 1.227 --- src/usr.bin/tmux/window-copy.c 2019/07/08 20:29:11 1.228 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.227 2019/07/05 07:52:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.228 2019/07/08 20:29:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 577,582 **** --- 577,583 ---- struct window_copy_mode_data *data = wme->data; struct screen *s = &data->screen; struct screen_write_ctx ctx; + int search; screen_resize(s, sx, sy, 1); if (data->backing != &wp->base) *************** *** 589,601 **** if (data->oy > screen_hsize(data->backing)) data->oy = screen_hsize(data->backing); window_copy_clear_selection(wme); screen_write_start(&ctx, NULL, s); window_copy_write_lines(wme, &ctx, 0, screen_size_y(s) - 1); screen_write_stop(&ctx); ! if (data->searchmark != NULL) window_copy_search_marks(wme, NULL); data->searchx = data->cx; data->searchy = data->cy; --- 590,604 ---- if (data->oy > screen_hsize(data->backing)) data->oy = screen_hsize(data->backing); + search = (data->searchmark != NULL); window_copy_clear_selection(wme); + window_copy_clear_marks(wme); screen_write_start(&ctx, NULL, s); window_copy_write_lines(wme, &ctx, 0, screen_size_y(s) - 1); screen_write_stop(&ctx); ! if (search) window_copy_search_marks(wme, NULL); data->searchx = data->cx; data->searchy = data->cy;