summaryrefslogtreecommitdiff
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
parentc1076fd3fa03ca9a2b6ac6c1953d6effb85752c7 (diff)
Hooks for after-select-pane and after-select-window.
-rw-r--r--usr.bin/tmux/cmd-select-pane.c5
-rw-r--r--usr.bin/tmux/cmd-select-window.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c
index d84c13a92a8..7d502fc1034 100644
--- a/usr.bin/tmux/cmd-select-pane.c
+++ b/usr.bin/tmux/cmd-select-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-pane.c,v 1.38 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-select-pane.c,v 1.39 2017/08/08 09:21:20 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -156,7 +156,8 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
}
window_redraw_active_switch(w, wp);
if (window_set_active_pane(w, wp)) {
- cmd_find_from_winlink(current, wl);
+ cmd_find_from_winlink_pane(current, wl, wp);
+ hooks_insert(s->hooks, item, current, "after-select-pane");
server_status_window(w);
server_redraw_window_borders(w);
}
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();