capture-pane -P (which is used in control mode) escapes control characters
in octal as \0xx but does not escape backslash itself, which makes it
impossible to tell if a sequence like \001 is ^A or a backslash followed by
the digits 001. The attached patch makes it escape backslashes in octal.
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c
index 1ed00b9..913738e 100644
--- a/cmd-capture-pane.c
+++ b/cmd-capture-pane.c
@@ -77,7 +77,7 @@ cmd_capture_pane_pending(struct args *args, struct
window_pane *wp,
buf = xstrdup("");
if (args_has(args, 'C')) {
for (i = 0; i < linelen; i++) {
- if (line[i] >= ' ') {
+ if (line[i] >= ' ' && line[i] != '\\') {
tmp[0] = line[i];
tmp[1] = '\0';
} else