mirror of
https://github.com/tmux/tmux.git
synced 2025-01-06 07:48:48 +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);
|
||||
pi.flags = flags;
|
||||
pi.file = path;
|
||||
pi.line = 1;
|
||||
|
||||
pr = cmd_parse_from_file(f, &pi);
|
||||
fclose(f);
|
||||
|
@ -356,7 +356,7 @@ command : assignment TOKEN
|
||||
|
||||
$$ = xcalloc(1, sizeof *$$);
|
||||
$$->name = $2;
|
||||
$$->line = ps->input->line;
|
||||
$$->line = ps->input->line - 1;
|
||||
|
||||
}
|
||||
| assignment TOKEN arguments
|
||||
@ -365,7 +365,7 @@ command : assignment TOKEN
|
||||
|
||||
$$ = xcalloc(1, sizeof *$$);
|
||||
$$->name = $2;
|
||||
$$->line = ps->input->line;
|
||||
$$->line = ps->input->line - 1;
|
||||
|
||||
$$->argc = $3.argc;
|
||||
$$->argv = $3.argv;
|
||||
|
@ -208,8 +208,8 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item,
|
||||
if (args_has(self->args, 'v'))
|
||||
cmdq_print(item, "%s", value);
|
||||
else if (options_isstring(o)) {
|
||||
utf8_stravis(&escaped, value, VIS_OCTAL|VIS_TAB|VIS_NL|VIS_DQ);
|
||||
cmdq_print(item, "%s \"%s\"", name, escaped);
|
||||
escaped = args_escape(value);
|
||||
cmdq_print(item, "%s %s", name, escaped);
|
||||
free(escaped);
|
||||
} else
|
||||
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;
|
||||
}
|
||||
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++ = '$';
|
||||
} else if (src < end - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user