mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Make window_pane_index work the same as window_index, from Ben Boeckel.
This commit is contained in:
@ -49,15 +49,18 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
struct session *s;
|
||||
struct environ env;
|
||||
const char *cmd;
|
||||
char *cause;
|
||||
char *cause;
|
||||
u_int idx;
|
||||
|
||||
if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL)
|
||||
return (-1);
|
||||
w = wl->window;
|
||||
|
||||
if (!args_has(self->args, 'k') && wp->fd != -1) {
|
||||
if (window_pane_index(wp, &idx) != 0)
|
||||
fatalx("index not found");
|
||||
ctx->error(ctx, "pane still active: %s:%u.%u",
|
||||
s->name, wl->idx, window_pane_index(w, wp));
|
||||
s->name, wl->idx, idx);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user