mirror of
https://github.com/tmate-io/tmate.git
synced 2025-04-24 03:19:47 +02: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);
|
return (CMD_RETURN_WAIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c != NULL && c->session == NULL)
|
if (c != NULL && c->session == NULL && c->cwd != NULL)
|
||||||
cwd = c->cwd;
|
cwd = c->cwd;
|
||||||
else if ((s = c->session) != NULL)
|
else if ((s = c->session) != NULL && s->cwd != NULL)
|
||||||
cwd = s->cwd;
|
cwd = s->cwd;
|
||||||
else
|
else
|
||||||
cwd = ".";
|
cwd = ".";
|
||||||
|
@ -142,7 +142,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
format_defaults(ft, c, NULL, NULL, NULL);
|
format_defaults(ft, c, NULL, NULL, NULL);
|
||||||
to_free = cwd = format_expand(ft, args_get(args, 'c'));
|
to_free = cwd = format_expand(ft, args_get(args, 'c'));
|
||||||
format_free(ft);
|
format_free(ft);
|
||||||
} else if (c != NULL && c->session == NULL)
|
} else if (c != NULL && c->session == NULL && c->cwd != NULL)
|
||||||
cwd = c->cwd;
|
cwd = c->cwd;
|
||||||
else
|
else
|
||||||
cwd = ".";
|
cwd = ".";
|
||||||
|
@ -97,9 +97,9 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
goto do_print;
|
goto do_print;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c != NULL && c->session == NULL)
|
if (c != NULL && c->session == NULL && c->cwd != NULL)
|
||||||
cwd = c->cwd;
|
cwd = c->cwd;
|
||||||
else if ((s = c->session) != NULL)
|
else if ((s = c->session) != NULL && s->cwd != NULL)
|
||||||
cwd = s->cwd;
|
cwd = s->cwd;
|
||||||
else
|
else
|
||||||
cwd = ".";
|
cwd = ".";
|
||||||
|
7
tmux.c
7
tmux.c
@ -190,9 +190,12 @@ main(int argc, char **argv)
|
|||||||
const char *s;
|
const char *s;
|
||||||
int opt, flags, keys;
|
int opt, flags, keys;
|
||||||
|
|
||||||
setlocale(LC_CTYPE, "en_US.UTF-8");
|
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
|
||||||
setlocale(LC_TIME, "");
|
setlocale(LC_CTYPE, "");
|
||||||
|
if (wcwidth(0xfffd) != 1)
|
||||||
|
errx(1, "no UTF-8 locale; please set LC_CTYPE");
|
||||||
|
|
||||||
|
setlocale(LC_TIME, "");
|
||||||
tzset();
|
tzset();
|
||||||
|
|
||||||
if (**argv == '-')
|
if (**argv == '-')
|
||||||
|
Loading…
Reference in New Issue
Block a user