summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-select-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-08-08 09:21:21 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-08-08 09:21:21 +0000
commit07981adedbcfd2eaba0c4767799613b3b572d302 (patch)
tree9adf64dab0bed2215f5ac471b236c43ab68bd5a4 /usr.bin/tmux/cmd-select-window.c
parentc1076fd3fa03ca9a2b6ac6c1953d6effb85752c7 (diff)
Hooks for after-select-pane and after-select-window.
Diffstat (limited to 'usr.bin/tmux/cmd-select-window.c')
-rw-r--r--usr.bin/tmux/cmd-select-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-select-window.c b/usr.bin/tmux/cmd-select-window.c
index cf42d063d1a..6e274564cba 100644
--- a/usr.bin/tmux/cmd-select-window.c
+++ b/usr.bin/tmux/cmd-select-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-window.c,v 1.20 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-select-window.c,v 1.21 2017/08/08 09:21:20 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -117,8 +117,9 @@ cmd_select_window_exec(struct cmd *self, struct cmdq_item *item)
return (CMD_RETURN_ERROR);
}
}
- cmd_find_from_session(&item->shared->current, s);
+ cmd_find_from_session(current, s);
server_redraw_session(s);
+ hooks_insert(s->hooks, item, current, "after-select-window");
} else {
/*
* If -T and select-window is invoked on same window as
@@ -136,6 +137,7 @@ cmd_select_window_exec(struct cmd *self, struct cmdq_item *item)
cmd_find_from_session(current, s);
server_redraw_session(s);
}
+ hooks_insert(s->hooks, item, current, "after-select-window");
}
recalculate_sizes();