mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Merge branch 'obsd-master'
Conflicts: client.c
This commit is contained in:
commit
a131b82e95
17 changed files with 249 additions and 189 deletions
11
cmd.c
11
cmd.c
|
|
@ -794,8 +794,11 @@ cmd_find_session(struct cmd_q *cmdq, const char *arg, int prefer_unattached)
|
|||
int ambiguous;
|
||||
|
||||
/* A NULL argument means the current session. */
|
||||
if (arg == NULL)
|
||||
return (cmd_current_session(cmdq, prefer_unattached));
|
||||
if (arg == NULL) {
|
||||
if ((s = cmd_current_session(cmdq, prefer_unattached)) == NULL)
|
||||
cmdq_error(cmdq, "can't establish current session");
|
||||
return (s);
|
||||
}
|
||||
|
||||
/* Lookup as pane id or window id. */
|
||||
if ((wp = cmd_lookup_paneid(arg)) != NULL)
|
||||
|
|
@ -812,7 +815,9 @@ cmd_find_session(struct cmd_q *cmdq, const char *arg, int prefer_unattached)
|
|||
/* An empty session name is the current session. */
|
||||
if (*tmparg == '\0') {
|
||||
free(tmparg);
|
||||
return (cmd_current_session(cmdq, prefer_unattached));
|
||||
if ((s = cmd_current_session(cmdq, prefer_unattached)) == NULL)
|
||||
cmdq_error(cmdq, "can't establish current session");
|
||||
return (s);
|
||||
}
|
||||
|
||||
/* Find the session, if any. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue