From c5f9b07e1bd81f28fdfd41513b3df0060296d2c3 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 30 May 2022 12:51:27 +0000 Subject: [PATCH] Do not send focus sequences when focus is enabled or disabled by the application if it is turned off. GitHub issue 3142. --- usr.bin/tmux/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 86f6b60c51e..8f3d04ea42b 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.200 2022/03/08 12:01:19 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.201 2022/05/30 12:51:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1798,6 +1798,8 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx) screen_write_mode_set(sctx, MODE_FOCUSON); if (wp == NULL) break; + if (!options_get_number(global_options, "focus-events")) + break; if (wp->flags & PANE_FOCUSED) bufferevent_write(wp->event, "\033[I", 3); else -- 2.20.1