mirror of
https://github.com/tmux/tmux.git
synced 2025-01-13 03:48:51 +00:00
Write escaped output in control mode rather than hex, from George Nachman.
This commit is contained in:
parent
8aa40ec1c7
commit
99934bf998
@ -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) {
|
if (winlink_find_by_window(&c->session->windows, wp->window) != NULL) {
|
||||||
message = evbuffer_new();
|
message = evbuffer_new();
|
||||||
evbuffer_add_printf(message, "%%output %u ", wp->id);
|
evbuffer_add_printf(message, "%%output %u ", wp->id);
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++) {
|
||||||
evbuffer_add_printf(message, "%02hhx", buf[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);
|
control_write_buffer(c, message);
|
||||||
evbuffer_free(message);
|
evbuffer_free(message);
|
||||||
}
|
}
|
||||||
|
2
tmux.1
2
tmux.1
@ -3672,7 +3672,7 @@ The new layout is
|
|||||||
.It Ic %output Ar pane-id Ar value
|
.It Ic %output Ar pane-id Ar value
|
||||||
A window pane produced output.
|
A window pane produced output.
|
||||||
.Ar value
|
.Ar value
|
||||||
contains that output with each byte encoded as two hex digits.
|
escapes non-printable characters and backslash as octal \\xxx.
|
||||||
.It Ic %session-changed Ar session-id Ar name
|
.It Ic %session-changed Ar session-id Ar name
|
||||||
The client is now attached to the session with ID
|
The client is now attached to the session with ID
|
||||||
.Ar session-id ,
|
.Ar session-id ,
|
||||||
|
Loading…
Reference in New Issue
Block a user