aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2016-10-13 22:48:51 +0000
committernicm <nicm>2016-10-13 22:48:51 +0000
commit4289a1ebfa7479413ec5ac543b88c4ea039d00a0 (patch)
treed17862b06b8822aa1b8ab91d83e51a47e25e60e3 /tmux.h
parent7a1a01feeff7b2ab17e2caef2d6b2180a8c1e70e (diff)
downloadrtmux-4289a1ebfa7479413ec5ac543b88c4ea039d00a0.tar.gz
rtmux-4289a1ebfa7479413ec5ac543b88c4ea039d00a0.tar.bz2
rtmux-4289a1ebfa7479413ec5ac543b88c4ea039d00a0.zip
Trying to do hooks generically is way too complicated and unreliable and
confusing, particularly trying to automatically figure out what target hooks should be using. So simplify it: - drop before hooks entirely, they don't seem to be very useful; - commands with special requirements now fire their own after hook (for example, if they change session or window, or if they have -t and -s and need to choose which one the hook uses as current target); - commands with no special requirements can have the CMD_AFTERHOOK flag added and they will use the -t state. At the moment new-session, new-window, split-window fire their own hook, and display-message uses the flag. The remaining commands still need to be looked at.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmux.h b/tmux.h
index 2a271ec5..3f29f07f 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1339,8 +1339,7 @@ struct cmd_q {
int references;
int flags;
#define CMD_Q_DEAD 0x1
-#define CMD_Q_REENTRY 0x2
-#define CMD_Q_NOHOOKS 0x4
+#define CMD_Q_NOHOOKS 0x2
struct client *client;
int client_exit;
@@ -1404,6 +1403,7 @@ struct cmd_entry {
#define CMD_STARTSERVER 0x1
#define CMD_READONLY 0x2
+#define CMD_AFTERHOOK 0x4
int flags;
enum cmd_retval (*exec)(struct cmd *, struct cmd_q *);