From fd8e1f24a98040feccc0e479a19a9569ab63be55 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 7 Dec 2021 07:28:45 +0000 Subject: Respond to OSC 4 query. --- usr.bin/tmux/input.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index cb7fedec156..e01f29a37af 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.197 2021/12/07 07:21:40 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.198 2021/12/07 07:28:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -2530,6 +2530,12 @@ input_osc_4(struct input_ctx *ictx, const char *p) } s = strsep(&next, ";"); + if (strcmp(s, "?") == 0) { + c = colour_palette_get(ictx->palette, idx); + if (c != -1) + input_osc_colour_reply(ictx, 4, c); + continue; + } if ((c = input_osc_parse_colour(s)) == -1) { s = next; continue; -- cgit v1.2.3