mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
81f78f0da7
@ -73,9 +73,9 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
return (CMD_RETURN_WAIT);
|
||||
}
|
||||
|
||||
if (c != NULL && c->session == NULL)
|
||||
if (c != NULL && c->session == NULL && c->cwd != NULL)
|
||||
cwd = c->cwd;
|
||||
else if ((s = c->session) != NULL)
|
||||
else if ((s = c->session) != NULL && s->cwd != NULL)
|
||||
cwd = s->cwd;
|
||||
else
|
||||
cwd = ".";
|
||||
|
@ -142,7 +142,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
format_defaults(ft, c, NULL, NULL, NULL);
|
||||
to_free = cwd = format_expand(ft, args_get(args, 'c'));
|
||||
format_free(ft);
|
||||
} else if (c != NULL && c->session == NULL)
|
||||
} else if (c != NULL && c->session == NULL && c->cwd != NULL)
|
||||
cwd = c->cwd;
|
||||
else
|
||||
cwd = ".";
|
||||
|
@ -97,9 +97,9 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
goto do_print;
|
||||
}
|
||||
|
||||
if (c != NULL && c->session == NULL)
|
||||
if (c != NULL && c->session == NULL && c->cwd != NULL)
|
||||
cwd = c->cwd;
|
||||
else if ((s = c->session) != NULL)
|
||||
else if ((s = c->session) != NULL && s->cwd != NULL)
|
||||
cwd = s->cwd;
|
||||
else
|
||||
cwd = ".";
|
||||
|
7
tmux.c
7
tmux.c
@ -190,9 +190,12 @@ main(int argc, char **argv)
|
||||
const char *s;
|
||||
int opt, flags, keys;
|
||||
|
||||
setlocale(LC_CTYPE, "en_US.UTF-8");
|
||||
setlocale(LC_TIME, "");
|
||||
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
|
||||
setlocale(LC_CTYPE, "");
|
||||
if (wcwidth(0xfffd) != 1)
|
||||
errx(1, "no UTF-8 locale; please set LC_CTYPE");
|
||||
|
||||
setlocale(LC_TIME, "");
|
||||
tzset();
|
||||
|
||||
if (**argv == '-')
|
||||
|
Loading…
Reference in New Issue
Block a user