mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-28 06:46:38 -04:00
osc: add support for OSC l function, for setting the window title
This originated in SunOS and is also supported by xterm as an alternative to the more commonly used OSC 2 control function. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Miscellaneous
This commit is contained in:
parent
1e63dddb89
commit
a7f022f97f
1 changed files with 7 additions and 0 deletions
7
osc.c
7
osc.c
|
|
@ -530,6 +530,13 @@ osc_notify(struct terminal *term, char *string)
|
|||
void
|
||||
osc_dispatch(struct terminal *term)
|
||||
{
|
||||
if (term->vt.osc.idx > 0 && term->vt.osc.data[0] == 'l') {
|
||||
const char *str = (const char *)term->vt.osc.data;
|
||||
LOG_DBG("OSC: %.*s (prefix = 'l')", (int)term->vt.osc.idx, str);
|
||||
term_set_window_title(term, str + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned param = 0;
|
||||
int data_ofs = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue