diff options
author | nicm <nicm> | 2015-12-13 17:55:14 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-12-13 17:55:14 +0000 |
commit | 9f5aca62a94f46be9c7637ebd3269d012c9346a5 (patch) | |
tree | 90be91151129e3d3089020f9c988af0d614b2dc5 /tmux.h | |
parent | 9b7697db62dc1c809955e8f8fea2868c230cc503 (diff) | |
download | rtmux-9f5aca62a94f46be9c7637ebd3269d012c9346a5.tar.gz rtmux-9f5aca62a94f46be9c7637ebd3269d012c9346a5.tar.bz2 rtmux-9f5aca62a94f46be9c7637ebd3269d012c9346a5.zip |
Use struct cmd_find_state directly and remove cmd_state_flag, also
change so that winlink is set even if an index is too.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 61 |
1 files changed, 27 insertions, 34 deletions
@@ -1293,18 +1293,37 @@ struct args { char **argv; }; -/* Context for a command about to be executed. */ -struct cmd_state_flag { - struct session *s; - struct winlink *wl; - struct window_pane *wp; - int idx; +/* Command find structures. */ +enum cmd_find_type { + CMD_FIND_PANE, + CMD_FIND_WINDOW, + CMD_FIND_SESSION, +}; +struct cmd_find_state { + struct cmd_q *cmdq; + int flags; + struct cmd_find_state *current; + struct session *s; + struct winlink *wl; + struct window *w; + struct window_pane *wp; + int idx; }; + +/* Command find flags. */ +#define CMD_FIND_PREFER_UNATTACHED 0x1 +#define CMD_FIND_QUIET 0x2 +#define CMD_FIND_WINDOW_INDEX 0x4 +#define CMD_FIND_DEFAULT_MARKED 0x8 +#define CMD_FIND_EXACT_SESSION 0x10 +#define CMD_FIND_EXACT_WINDOW 0x20 + +/* Context for command being executed. */ struct cmd_state { struct client *c; - struct cmd_state_flag tflag; - struct cmd_state_flag sflag; + struct cmd_find_state tflag; + struct cmd_find_state sflag; }; /* Command and list of commands. */ @@ -1407,32 +1426,6 @@ struct cmd_entry { #define CMD_ALL_S (CMD_SESSION_S|CMD_WINDOW_S|CMD_PANE_S|CMD_INDEX_S| \ CMD_PANE_MARKED_S|CMD_WINDOW_MARKED_S) -/* Command find structures. */ -enum cmd_find_type { - CMD_FIND_PANE, - CMD_FIND_WINDOW, - CMD_FIND_SESSION, -}; -struct cmd_find_state { - struct cmd_q *cmdq; - int flags; - struct cmd_find_state *current; - - struct session *s; - struct winlink *wl; - struct window *w; - struct window_pane *wp; - int idx; -}; - -/* Command fine flags. */ -#define CMD_FIND_PREFER_UNATTACHED 0x1 -#define CMD_FIND_QUIET 0x2 -#define CMD_FIND_WINDOW_INDEX 0x4 -#define CMD_FIND_DEFAULT_MARKED 0x8 -#define CMD_FIND_EXACT_SESSION 0x10 -#define CMD_FIND_EXACT_WINDOW 0x20 - /* Key binding and key table. */ struct key_binding { key_code key; |