mirror of
https://github.com/tmux/tmux.git
synced 2025-01-08 17:18:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
19a3a9ee20
1
cfg.c
1
cfg.c
@ -125,6 +125,7 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags,
|
|||||||
memset(&pi, 0, sizeof pi);
|
memset(&pi, 0, sizeof pi);
|
||||||
pi.flags = flags;
|
pi.flags = flags;
|
||||||
pi.file = path;
|
pi.file = path;
|
||||||
|
pi.line = 1;
|
||||||
|
|
||||||
pr = cmd_parse_from_file(f, &pi);
|
pr = cmd_parse_from_file(f, &pi);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
@ -356,7 +356,7 @@ command : assignment TOKEN
|
|||||||
|
|
||||||
$$ = xcalloc(1, sizeof *$$);
|
$$ = xcalloc(1, sizeof *$$);
|
||||||
$$->name = $2;
|
$$->name = $2;
|
||||||
$$->line = ps->input->line;
|
$$->line = ps->input->line - 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
| assignment TOKEN arguments
|
| assignment TOKEN arguments
|
||||||
@ -365,7 +365,7 @@ command : assignment TOKEN
|
|||||||
|
|
||||||
$$ = xcalloc(1, sizeof *$$);
|
$$ = xcalloc(1, sizeof *$$);
|
||||||
$$->name = $2;
|
$$->name = $2;
|
||||||
$$->line = ps->input->line;
|
$$->line = ps->input->line - 1;
|
||||||
|
|
||||||
$$->argc = $3.argc;
|
$$->argc = $3.argc;
|
||||||
$$->argv = $3.argv;
|
$$->argv = $3.argv;
|
||||||
|
@ -208,8 +208,8 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item,
|
|||||||
if (args_has(self->args, 'v'))
|
if (args_has(self->args, 'v'))
|
||||||
cmdq_print(item, "%s", value);
|
cmdq_print(item, "%s", value);
|
||||||
else if (options_isstring(o)) {
|
else if (options_isstring(o)) {
|
||||||
utf8_stravis(&escaped, value, VIS_OCTAL|VIS_TAB|VIS_NL|VIS_DQ);
|
escaped = args_escape(value);
|
||||||
cmdq_print(item, "%s \"%s\"", name, escaped);
|
cmdq_print(item, "%s %s", name, escaped);
|
||||||
free(escaped);
|
free(escaped);
|
||||||
} else
|
} else
|
||||||
cmdq_print(item, "%s %s", name, value);
|
cmdq_print(item, "%s %s", name, value);
|
||||||
|
4
utf8.c
4
utf8.c
@ -209,7 +209,9 @@ utf8_strvis(char *dst, const char *src, size_t len, int flag)
|
|||||||
src -= ud.have;
|
src -= ud.have;
|
||||||
}
|
}
|
||||||
if (src[0] == '$' && src < end - 1) {
|
if (src[0] == '$' && src < end - 1) {
|
||||||
if (isalpha((u_char)src[1]) || src[1] == '_')
|
if (isalpha((u_char)src[1]) ||
|
||||||
|
src[1] == '_' ||
|
||||||
|
src[1] == '{')
|
||||||
*dst++ = '\\';
|
*dst++ = '\\';
|
||||||
*dst++ = '$';
|
*dst++ = '$';
|
||||||
} else if (src < end - 1)
|
} else if (src < end - 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user