mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 12:38:57 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
91dec25fc9
@ -976,8 +976,11 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
|
|||||||
} else if (cmd_find_from_client(¤t, item->client) == 0) {
|
} else if (cmd_find_from_client(¤t, item->client) == 0) {
|
||||||
fs->current = ¤t;
|
fs->current = ¤t;
|
||||||
log_debug("%s: current is from client", __func__);
|
log_debug("%s: current is from client", __func__);
|
||||||
} else
|
} else {
|
||||||
|
if (~flags & CMD_FIND_QUIET)
|
||||||
|
cmdq_error(item, "no current target");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
if (!cmd_find_valid_state(fs->current))
|
if (!cmd_find_valid_state(fs->current))
|
||||||
fatalx("invalid current find state");
|
fatalx("invalid current find state");
|
||||||
|
|
||||||
|
12
cmd-string.c
12
cmd-string.c
@ -159,21 +159,19 @@ cmd_string_parse(const char *s, const char *file, u_int line, char **cause)
|
|||||||
char **argv;
|
char **argv;
|
||||||
|
|
||||||
*cause = NULL;
|
*cause = NULL;
|
||||||
if (cmd_string_split(s, &argc, &argv) != 0)
|
if (cmd_string_split(s, &argc, &argv) != 0) {
|
||||||
goto error;
|
xasprintf(cause, "invalid or unknown command: %s", s);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
if (argc != 0) {
|
if (argc != 0) {
|
||||||
cmdlist = cmd_list_parse(argc, argv, file, line, cause);
|
cmdlist = cmd_list_parse(argc, argv, file, line, cause);
|
||||||
if (cmdlist == NULL) {
|
if (cmdlist == NULL) {
|
||||||
cmd_free_argv(argc, argv);
|
cmd_free_argv(argc, argv);
|
||||||
goto error;
|
return (NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmd_free_argv(argc, argv);
|
cmd_free_argv(argc, argv);
|
||||||
return (cmdlist);
|
return (cmdlist);
|
||||||
|
|
||||||
error:
|
|
||||||
xasprintf(cause, "invalid or unknown command: %s", s);
|
|
||||||
return (NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user