diff options
Diffstat (limited to 'control-notify.c')
-rw-r--r-- | control-notify.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/control-notify.c b/control-notify.c index 90ee4ffa..42c1695b 100644 --- a/control-notify.c +++ b/control-notify.c @@ -46,8 +46,12 @@ control_notify_input(struct client *c, struct window_pane *wp, if (winlink_find_by_window(&c->session->windows, wp->window) != NULL) { message = evbuffer_new(); evbuffer_add_printf(message, "%%output %u ", wp->id); - for (i = 0; i < len; i++) - evbuffer_add_printf(message, "%02hhx", buf[i]); + for (i = 0; i < len; i++) { + if (buf[i] < ' ' || buf[i] == '\\') + evbuffer_add_printf(message, "\\%03o", buf[i]); + else + evbuffer_add_printf(message, "%c", buf[i]); + } control_write_buffer(c, message); evbuffer_free(message); } |