aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/csi.c b/csi.c
index 7c6ea7ca..35a39f82 100644
--- a/csi.c
+++ b/csi.c
@@ -1250,7 +1250,6 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 9: LOG_WARN("unimplemented: maximize/unmaximize window"); break;
case 10: LOG_WARN("unimplemented: to/from full screen"); break;
case 20: LOG_WARN("unimplemented: report icon label"); break;
- case 21: LOG_WARN("unimplemented: report window title"); break;
case 24: LOG_WARN("unimplemented: resize window (DECSLPP)"); break;
case 11: /* report if window is iconified */
@@ -1354,6 +1353,14 @@ csi_dispatch(struct terminal *term, uint8_t final)
break;
}
+ case 21: {
+ char reply[3 + strlen(term->window_title) + 2 + 1];
+ int chars = xsnprintf(
+ reply, sizeof(reply), "\033]l%s\033\\", term->window_title);
+ term_to_slave(term, reply, chars);
+ break;
+ }
+
case 22: { /* push window title */
/* 0 - icon + title, 1 - icon, 2 - title */
unsigned what = vt_param_get(term, 1, 0);