From ab9ea5e61e2a3792f072be74c6fe3ffcbbe27f60 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 8 Jan 2023 22:17:04 +0000 Subject: [PATCH] Have client return 1 if process is interrupted to an input pane. --- usr.bin/tmux/window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 218613c7ea5..4903ca5d538 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.283 2023/01/06 07:09:27 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.284 2023/01/08 22:17:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1535,8 +1535,10 @@ window_pane_input_callback(struct client *c, __unused const char *path, wp = window_pane_find_by_id(cdata->wp); if (cdata->file != NULL && (wp == NULL || c->flags & CLIENT_DEAD)) { - if (wp == NULL) + if (wp == NULL) { + c->retval = 1; c->flags |= CLIENT_EXIT; + } file_cancel(cdata->file); } else if (cdata->file == NULL || closed || error != 0) { cmdq_continue(cdata->item); -- 2.20.1