aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 15:55:51 +0000
committernicm <nicm>2020-04-13 15:55:51 +0000
commit3f86d6d46014ca55e42cecd570d7f269b1d386b3 (patch)
tree94a72dc0995badc04a7471edb4782ce9707a4930 /tmux.h
parentadb76fd1ce8753a958d4ffe14db724f9f4d674ea (diff)
downloadrtmux-3f86d6d46014ca55e42cecd570d7f269b1d386b3.tar.gz
rtmux-3f86d6d46014ca55e42cecd570d7f269b1d386b3.tar.bz2
rtmux-3f86d6d46014ca55e42cecd570d7f269b1d386b3.zip
When adding a list of commands to the queue, instead of automatically
creating a new state for each group of commands, require the caller to create one and use it for all the commands in the list. This means the current target works even with list with multiple groups (which can happen if they are defined with newlines).
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/tmux.h b/tmux.h
index e5ecab9b..74b16c89 100644
--- a/tmux.h
+++ b/tmux.h
@@ -2058,6 +2058,7 @@ char *cmd_stringify_argv(int, char **);
char *cmd_get_alias(const char *);
const struct cmd_entry *cmd_get_entry(struct cmd *);
struct args *cmd_get_args(struct cmd *);
+u_int cmd_get_group(struct cmd *);
void cmd_get_source(struct cmd *, const char **, u_int *);
struct cmd *cmd_parse(int, char **, const char *, u_int, char **);
void cmd_free(struct cmd *);
@@ -2067,8 +2068,8 @@ void cmd_list_append(struct cmd_list *, struct cmd *);
void cmd_list_move(struct cmd_list *, struct cmd_list *);
void cmd_list_free(struct cmd_list *);
char *cmd_list_print(struct cmd_list *, int);
-struct cmd *cmd_list_first(struct cmd_list *, u_int *);
-struct cmd *cmd_list_next(struct cmd *, u_int *);
+struct cmd *cmd_list_first(struct cmd_list *);
+struct cmd *cmd_list_next(struct cmd *);
int cmd_list_all_have(struct cmd_list *, int);
int cmd_list_any_have(struct cmd_list *, int);
int cmd_mouse_at(struct window_pane *, struct mouse_event *,
@@ -2093,18 +2094,25 @@ struct cmd_parse_result *cmd_parse_from_arguments(int, char **,
struct cmd_parse_input *);
/* cmd-queue.c */
+struct cmdq_state *cmdq_new_state(struct cmd_find_state *, struct key_event *,
+ int);
+struct cmdq_state *cmdq_link_state(struct cmdq_state *);
+struct cmdq_state *cmdq_copy_state(struct cmdq_state *);
+void cmdq_free_state(struct cmdq_state *);
+void printflike(3, 4) cmdq_add_format(struct cmdq_state *, const char *,
+ const char *, ...);
+void cmdq_merge_formats(struct cmdq_item *, struct format_tree *);
struct cmdq_list *cmdq_new(void);
void cmdq_free(struct cmdq_list *);
const char *cmdq_get_name(struct cmdq_item *);
struct client *cmdq_get_client(struct cmdq_item *);
+struct cmdq_state *cmdq_get_state(struct cmdq_item *);
struct cmd_find_state *cmdq_get_target(struct cmdq_item *);
struct cmd_find_state *cmdq_get_source(struct cmdq_item *);
struct key_event *cmdq_get_event(struct cmdq_item *);
struct cmd_find_state *cmdq_get_current(struct cmdq_item *);
int cmdq_get_flags(struct cmdq_item *);
-void cmdq_merge_formats(struct cmdq_item *, struct format_tree *);
-struct cmdq_item *cmdq_get_command(struct cmd_list *, struct cmd_find_state *,
- struct key_event *, int);
+struct cmdq_item *cmdq_get_command(struct cmd_list *, struct cmdq_state *);
#define cmdq_get_callback(cb, data) cmdq_get_callback1(#cb, cb, data)
struct cmdq_item *cmdq_get_callback1(const char *, cmdq_cb, void *);
struct cmdq_item *cmdq_get_error(const char *);
@@ -2113,8 +2121,6 @@ struct cmdq_item *cmdq_append(struct client *, struct cmdq_item *);
void cmdq_insert_hook(struct session *, struct cmdq_item *,
struct cmd_find_state *, const char *, ...);
void cmdq_continue(struct cmdq_item *);
-void printflike(3, 4) cmdq_format(struct cmdq_item *, const char *,
- const char *, ...);
u_int cmdq_next(struct client *);
void cmdq_guard(struct cmdq_item *, const char *, int);
void printflike(2, 3) cmdq_print(struct cmdq_item *, const char *, ...);