aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-02-15 16:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2022-02-15 16:01:11 +0000
commit85ef73591da51be51c0ead6e7ae4414e349d46d3 (patch)
tree131aeb5d8cdb71e470c0c20b5527d26d5fac5717 /input.c
parentdf681390a6861b6a77d4623baf46d0a435729003 (diff)
parent5076beb009f761999a3b218a1a8d7cbfbc80ee03 (diff)
downloadrtmux-85ef73591da51be51c0ead6e7ae4414e349d46d3.tar.gz
rtmux-85ef73591da51be51c0ead6e7ae4414e349d46d3.tar.bz2
rtmux-85ef73591da51be51c0ead6e7ae4414e349d46d3.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'input.c')
-rw-r--r--input.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/input.c b/input.c
index 16f31ad7..5adc694d 100644
--- a/input.c
+++ b/input.c
@@ -2235,15 +2235,19 @@ input_enter_dcs(struct input_ctx *ictx)
static int
input_dcs_dispatch(struct input_ctx *ictx)
{
+ struct window_pane *wp = ictx->wp;
struct screen_write_ctx *sctx = &ictx->ctx;
u_char *buf = ictx->input_buf;
size_t len = ictx->input_len;
const char prefix[] = "tmux;";
const u_int prefixlen = (sizeof prefix) - 1;
+ if (wp == NULL)
+ return (0);
if (ictx->flags & INPUT_DISCARD)
return (0);
-
+ if (!options_get_number(ictx->wp->options, "allow-passthrough"))
+ return (0);
log_debug("%s: \"%s\"", __func__, buf);
if (len >= prefixlen && strncmp(buf, prefix, prefixlen) == 0)