diff options
author | Thomas Adam <thomas@xteddy.org> | 2022-08-02 14:01:09 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2022-08-02 14:01:09 +0100 |
commit | 7b8ececd8d76131b29273d62174c70a08211acfc (patch) | |
tree | 8b5dd8c840e6baec075d55208b8b1182ea1c4ddf /input.c | |
parent | 9a2fdf8fd45fd156590ac3eabc7baad866fd06df (diff) | |
parent | 42ba6c1b229c92256274e848e9c5ff1d59d9081b (diff) | |
download | rtmux-7b8ececd8d76131b29273d62174c70a08211acfc.tar.gz rtmux-7b8ececd8d76131b29273d62174c70a08211acfc.tar.bz2 rtmux-7b8ececd8d76131b29273d62174c70a08211acfc.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -2242,22 +2242,27 @@ static int input_dcs_dispatch(struct input_ctx *ictx) { struct window_pane *wp = ictx->wp; + struct options *oo = wp->options; 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; + long long allow_passthrough = 0; if (wp == NULL) return (0); if (ictx->flags & INPUT_DISCARD) return (0); - if (!options_get_number(ictx->wp->options, "allow-passthrough")) + allow_passthrough = options_get_number(oo, "allow-passthrough"); + if (!allow_passthrough) return (0); log_debug("%s: \"%s\"", __func__, buf); - if (len >= prefixlen && strncmp(buf, prefix, prefixlen) == 0) - screen_write_rawstring(sctx, buf + prefixlen, len - prefixlen); + if (len >= prefixlen && strncmp(buf, prefix, prefixlen) == 0) { + screen_write_rawstring(sctx, buf + prefixlen, len - prefixlen, + allow_passthrough == 2); + } return (0); } |