If an application gives the first parameter to OSC 52, validate and pass

on to outside terminal. GitHub issue 3192.
This commit is contained in:
nicm
2022-06-09 09:12:55 +00:00
parent c07d582e24
commit ccc9dc3bb4
7 changed files with 26 additions and 12 deletions

View File

@ -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);