summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-07-08 20:29:11 +0000
committernicm <nicm@openbsd.org>2019-07-08 20:29:11 +0000
commit0ec63559bfffbb5b5df5ad57082a8e12ada3ea41 (patch)
tree49afac9f9491fa3a998e70f5532f5c51213664e6
parentamd64 pmap: remove a "set but not used" variable, found when building the (diff)
downloadwireguard-openbsd-0ec63559bfffbb5b5df5ad57082a8e12ada3ea41.tar.xz
wireguard-openbsd-0ec63559bfffbb5b5df5ad57082a8e12ada3ea41.zip
Clear search marks before resize, GitHub issue 1823.
-rw-r--r--usr.bin/tmux/window-copy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c
index b0c2ea8249a..1f2ca16264a 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.227 2019/07/05 07:52:27 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.228 2019/07/08 20:29:11 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -577,6 +577,7 @@ window_copy_resize(struct window_mode_entry *wme, u_int sx, u_int sy)
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,13 +590,15 @@ window_copy_resize(struct window_mode_entry *wme, u_int sx, u_int sy)
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 (data->searchmark != NULL)
+ if (search)
window_copy_search_marks(wme, NULL);
data->searchx = data->cx;
data->searchy = data->cy;