From 67b926cf3c77737e3b40c9d70c38314ac19ba105 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 25 Jun 2012 14:27:25 +0000 Subject: Provide common helper function for adding windows and sessions to choose lists and expand %% in command before using it rather than at callback time. From Thomas Adam. --- tmux.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index a27b56ad..f4e953c3 100644 --- a/tmux.h +++ b/tmux.h @@ -852,8 +852,7 @@ struct window_choose_data { struct session *session; struct format_tree *ft; char *ft_template; - char *raw_format; - char *action; + char *command; u_int idx; }; @@ -2135,16 +2134,19 @@ void window_copy_pageup(struct window_pane *); /* window-choose.c */ extern const struct window_mode window_choose_mode; -void window_choose_vadd( - struct window_pane *, int, const char *, va_list); void window_choose_add(struct window_pane *, struct window_choose_data *); void window_choose_ready(struct window_pane *, u_int, void (*)(struct window_choose_data *), void (*)(struct window_choose_data *)); -struct window_choose_data *window_choose_data_create( - struct cmd_ctx *); +struct window_choose_data *window_choose_data_create(struct cmd_ctx *); void window_choose_ctx(struct window_choose_data *); +struct window_choose_data *window_choose_add_window(struct window_pane *, + struct cmd_ctx *, struct session *, struct winlink *, + const char *, char *, u_int); +struct window_choose_data *window_choose_add_session(struct window_pane *, + struct cmd_ctx *, struct session *, const char *, + char *, u_int); /* names.c */ void queue_window_name(struct window *); -- cgit v1.2.3