diff options
author | Thomas Adam <thomas@xteddy.org> | 2022-06-09 12:01:09 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2022-06-09 12:01:09 +0100 |
commit | 810daefdd14d918e31d297a37c16de94d6fd641d (patch) | |
tree | 7601bc8443bfc5a03cd8e02c6f56058ee2943f80 /input.c | |
parent | be2eb57d6295a72b870841bbb85e65d624c5d87c (diff) | |
parent | ccc9dc3bb49ac258c856d8478346b4ce829b188e (diff) | |
download | rtmux-810daefdd14d918e31d297a37c16de94d6fd641d.tar.gz rtmux-810daefdd14d918e31d297a37c16de94d6fd641d.tar.bz2 rtmux-810daefdd14d918e31d297a37c16de94d6fd641d.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -2693,6 +2693,9 @@ input_osc_52(struct input_ctx *ictx, const char *p) int outlen, state; struct screen_write_ctx ctx; struct paste_buffer *pb; + const char* allow = "cpqs01234567"; + char flags[sizeof allow] = ""; + u_int i, j = 0; if (wp == NULL) return; @@ -2707,6 +2710,12 @@ input_osc_52(struct input_ctx *ictx, const char *p) return; log_debug("%s: %s", __func__, end); + for (i = 0; p + i != end; i++) { + if (strchr(allow, p[i]) != NULL && strchr(flags, p[i]) == NULL) + flags[j++] = p[i]; + } + log_debug("%s: %.*s %s", __func__, (int)(end - p - 1), p, flags); + if (strcmp(end, "?") == 0) { if ((pb = paste_get_top(NULL)) != NULL) buf = paste_buffer_data(pb, &len); @@ -2728,7 +2737,7 @@ input_osc_52(struct input_ctx *ictx, const char *p) } screen_write_start_pane(&ctx, wp, NULL); - screen_write_setselection(&ctx, out, outlen); + screen_write_setselection(&ctx, flags, out, outlen); screen_write_stop(&ctx); notify_pane("pane-set-clipboard", wp); |