version 1.38, 2016/10/10 21:51:39 |
version 1.39, 2016/10/16 19:04:05 |
|
|
"[#{window_width}x#{window_height}] " \ |
"[#{window_width}x#{window_height}] " \ |
"(#{window_panes} panes) #{window_find_matches}" |
"(#{window_panes} panes) #{window_find_matches}" |
|
|
static enum cmd_retval cmd_find_window_exec(struct cmd *, struct cmd_q *); |
static enum cmd_retval cmd_find_window_exec(struct cmd *, struct cmdq_item *); |
|
|
static void cmd_find_window_callback(struct window_choose_data *); |
static void cmd_find_window_callback(struct window_choose_data *); |
|
|
/* Flags for determining matching behavior. */ |
/* Flags for determining matching behavior. */ |
#define CMD_FIND_WINDOW_BY_TITLE 0x1 |
#define CMD_FIND_WINDOW_BY_TITLE 0x1 |
|
|
} |
} |
|
|
static enum cmd_retval |
static enum cmd_retval |
cmd_find_window_exec(struct cmd *self, struct cmd_q *cmdq) |
cmd_find_window_exec(struct cmd *self, struct cmdq_item *item) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
struct client *c = cmdq->state.c; |
struct client *c = item->state.c; |
struct window_choose_data *cdata; |
struct window_choose_data *cdata; |
struct session *s = cmdq->state.tflag.s; |
struct session *s = item->state.tflag.s; |
struct winlink *wl = cmdq->state.tflag.wl, *wm; |
struct winlink *wl = item->state.tflag.wl, *wm; |
struct cmd_find_window_list find_list; |
struct cmd_find_window_list find_list; |
struct cmd_find_window_data *find_data; |
struct cmd_find_window_data *find_data; |
struct cmd_find_window_data *find_data1; |
struct cmd_find_window_data *find_data1; |
|
|
u_int i, match_flags; |
u_int i, match_flags; |
|
|
if (c == NULL) { |
if (c == NULL) { |
cmdq_error(cmdq, "no client available"); |
cmdq_error(item, "no client available"); |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
} |
} |
|
|
|
|
free(searchstr); |
free(searchstr); |
|
|
if (TAILQ_EMPTY(&find_list)) { |
if (TAILQ_EMPTY(&find_list)) { |
cmdq_error(cmdq, "no windows matching: %s", str); |
cmdq_error(item, "no windows matching: %s", str); |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
} |
} |
|
|