summaryrefslogtreecommitdiffstats
path: root/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm>2022-06-09 09:12:55 +0000
committernicm <nicm>2022-06-09 09:12:55 +0000
commitccc9dc3bb49ac258c856d8478346b4ce829b188e (patch)
tree308120cf8fd067226d532f57964b05b096c206f9 /screen-write.c
parentc07d582e2476db075252998388305f11302a8b23 (diff)
If an application gives the first parameter to OSC 52, validate and pass
on to outside terminal. GitHub issue 3192.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/screen-write.c b/screen-write.c
index 6b6a750e..213b533c 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -2085,12 +2085,14 @@ screen_write_overwrite(struct screen_write_ctx *ctx, struct grid_cell *gc,
/* Set external clipboard. */
void
-screen_write_setselection(struct screen_write_ctx *ctx, u_char *str, u_int len)
+screen_write_setselection(struct screen_write_ctx *ctx, const char *flags,
+ u_char *str, u_int len)
{
struct tty_ctx ttyctx;
screen_write_initctx(ctx, &ttyctx, 0);
ttyctx.ptr = str;
+ ttyctx.ptr2 = (void *)flags;
ttyctx.num = len;
tty_write(tty_cmd_setselection, &ttyctx);