From 52922e71bec547b02895cb3244c99124f5cb2b99 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 13 Aug 2021 19:25:24 +0000 Subject: [PATCH] Adjust overlay check callback before drawing data from pty. --- usr.bin/tmux/popup.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/popup.c b/usr.bin/tmux/popup.c index 9f652a85f4b..e536c7476b7 100644 --- a/usr.bin/tmux/popup.c +++ b/usr.bin/tmux/popup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popup.c,v 1.27 2021/08/13 18:54:54 nicm Exp $ */ +/* $OpenBSD: popup.c,v 1.28 2021/08/13 19:25:24 nicm Exp $ */ /* * Copyright (c) 2020 Nicholas Marriott @@ -489,9 +489,16 @@ popup_job_update_cb(struct job *job) if (size == 0) return; - c->overlay_check = NULL; + if (pd->md != NULL) { + c->overlay_check = menu_check_cb; + c->overlay_data = pd->md; + } else { + c->overlay_check = NULL; + c->overlay_data = NULL; + } input_parse_screen(pd->ictx, s, popup_init_ctx_cb, pd, data, size); c->overlay_check = popup_check_cb; + c->overlay_data = pd; evbuffer_drain(evb, size); } -- 2.20.1