summaryrefslogtreecommitdiff
path: root/src/ansi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ansi.c')
-rw-r--r--src/ansi.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ansi.c b/src/ansi.c
index d2b3cbc..28e3529 100644
--- a/src/ansi.c
+++ b/src/ansi.c
@@ -1562,25 +1562,28 @@ StringEnd()
}
#endif
#ifdef RXVT_OSC
- if (typ == 0 || typ == 1 || typ == 2 || typ == 20 || typ == 39 || typ == 49)
+ if (typ == 0 || typ == 1 || typ == 2 || typ == 11 || typ == 20 || typ == 39 || typ == 49)
{
int typ2;
typ2 = typ / 10;
- if (--typ2 < 0)
- typ2 = 0;
if (strcmp(curr->w_xtermosc[typ2], p))
{
- strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1);
- curr->w_xtermosc[typ2][sizeof(curr->w_xtermosc[typ2]) - 1] = 0;
+ if (typ != 11 || strcmp("?", p))
+ {
+ strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1);
+ curr->w_xtermosc[typ2][sizeof(curr->w_xtermosc[typ2]) - 1] = 0;
+ }
for (display = displays; display; display = display->d_next)
{
if (!D_CXT)
continue;
if (D_forecv->c_layer->l_bottom == &curr->w_layer)
- SetXtermOSC(typ2, curr->w_xtermosc[typ2]);
- if ((typ2 == 2 || typ2 == 3) && D_xtermosc[typ2])
+ SetXtermOSC(typ2, p);
+ if ((typ2 == 3 || typ2 == 4) && D_xtermosc[typ2])
Redisplay(0);
+ if (typ == 11 && !strcmp("?", p))
+ break;
}
}
}