osc: implement change window title and icon

This commit is contained in:
Daniel Eklöf 2019-07-05 09:46:48 +02:00
parent 998ce52b7e
commit 3ba1721c0f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 65 additions and 10 deletions

5
vt.c
View file

@ -799,10 +799,13 @@ action(struct terminal *term, enum action action, uint8_t c)
break;
case ACTION_OSC_PUT:
term->vt.osc.data[term->vt.osc.idx++] = c;
if (term->vt.osc.idx < (int)sizeof(term->vt.osc.data) - 1)
term->vt.osc.data[term->vt.osc.idx++] = c;
break;
case ACTION_OSC_END:
assert(term->vt.osc.idx < sizeof(term->vt.osc.data));
term->vt.osc.data[term->vt.osc.idx] = '\0';
return osc_dispatch(term);
case ACTION_HOOK: