mirror of
https://github.com/tmux/tmux.git
synced 2024-12-14 02:48:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
e90b5dcea3
26
cmd-parse.y
26
cmd-parse.y
@ -1083,12 +1083,34 @@ error:
|
|||||||
static int
|
static int
|
||||||
yylex_token_escape(char **buf, size_t *len)
|
yylex_token_escape(char **buf, size_t *len)
|
||||||
{
|
{
|
||||||
int ch, type;
|
int ch, type, o2, o3;
|
||||||
u_int size, i, tmp;
|
u_int size, i, tmp;
|
||||||
char s[9];
|
char s[9];
|
||||||
struct utf8_data ud;
|
struct utf8_data ud;
|
||||||
|
|
||||||
switch (ch = yylex_getc()) {
|
ch = yylex_getc();
|
||||||
|
|
||||||
|
if (ch >= '4' && ch <= '7') {
|
||||||
|
yyerror("invalid octal escape");
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
if (ch >= '0' && ch <= '3') {
|
||||||
|
o2 = yylex_getc();
|
||||||
|
if (o2 >= '0' && o2 <= '7') {
|
||||||
|
o3 = yylex_getc();
|
||||||
|
if (o3 >= '0' && o3 <= '7') {
|
||||||
|
ch = 64 * (ch - '0') +
|
||||||
|
8 * (o2 - '0') +
|
||||||
|
(o3 - '0');
|
||||||
|
yylex_append1(buf, len, ch);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
yyerror("invalid octal escape");
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (ch) {
|
||||||
case EOF:
|
case EOF:
|
||||||
return (0);
|
return (0);
|
||||||
case 'e':
|
case 'e':
|
||||||
|
6
tmux.1
6
tmux.1
@ -520,7 +520,11 @@ the given four or eight digit hexadecimal number.
|
|||||||
When preceded (escaped) by a \e, the following characters are replaced: \ee by
|
When preceded (escaped) by a \e, the following characters are replaced: \ee by
|
||||||
the escape character; \er by a carriage return; \en by a newline; and \et by a
|
the escape character; \er by a carriage return; \en by a newline; and \et by a
|
||||||
tab.
|
tab.
|
||||||
.Pp
|
.It
|
||||||
|
\eooo is replaced by a character of the octal value ooo.
|
||||||
|
Three octal digits are required, for example \e001.
|
||||||
|
The largest valid character is \e377.
|
||||||
|
.It
|
||||||
Any other characters preceded by \e are replaced by themselves (that is, the \e
|
Any other characters preceded by \e are replaced by themselves (that is, the \e
|
||||||
is removed) and are not treated as having any special meaning - so for example
|
is removed) and are not treated as having any special meaning - so for example
|
||||||
\e; will not mark a command sequence and \e$ will not expand an environment
|
\e; will not mark a command sequence and \e$ will not expand an environment
|
||||||
|
Loading…
Reference in New Issue
Block a user