=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/input.c,v retrieving revision 1.216 retrieving revision 1.217 diff -u -r1.216 -r1.217 --- src/usr.bin/tmux/input.c 2023/06/30 13:19:32 1.216 +++ src/usr.bin/tmux/input.c 2023/07/03 16:47:43 1.217 @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.216 2023/06/30 13:19:32 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.217 2023/07/03 16:47:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -144,6 +144,7 @@ static void input_osc_110(struct input_ctx *, const char *); static void input_osc_111(struct input_ctx *, const char *); static void input_osc_112(struct input_ctx *, const char *); +static void input_osc_133(struct input_ctx *, const char *); /* Transition entry/exit handlers. */ static void input_clear(struct input_ctx *); @@ -2347,6 +2348,9 @@ case 112: input_osc_112(ictx, p); break; + case 133: + input_osc_133(ictx, p); + break; default: log_debug("%s: unknown '%u'", __func__, option); break; @@ -2736,6 +2740,24 @@ screen_set_cursor_colour(ictx->ctx.s, -1); } +/* Handle the OSC 133 sequence. */ +static void +input_osc_133(struct input_ctx *ictx, const char *p) +{ + struct grid *gd = ictx->ctx.s->grid; + u_int line = ictx->ctx.s->cy + gd->hsize; + struct grid_line *gl; + + if (line > gd->hsize + gd->sy - 1) + return; + gl = grid_get_line(gd, line); + + switch (*p) { + case 'A': + gl->flags |= GRID_LINE_START_PROMPT; + break; + } +} /* Handle the OSC 52 sequence for setting the clipboard. */ static void