From dfb7bb683057d08303955c49073f4b475bd0e2d6 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 26 Apr 2019 11:38:51 +0000 Subject: Merge hooks into options and make each one an array option. This allows multiple commands to be easily bound to one hook. set-hook and show-hooks remain but they are now variants of set-option and show-options. show-options now has a -H flag to show hooks (by default they are not shown). --- cmd-select-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd-select-window.c') diff --git a/cmd-select-window.c b/cmd-select-window.c index f35b8202..54965e89 100644 --- a/cmd-select-window.c +++ b/cmd-select-window.c @@ -119,7 +119,7 @@ cmd_select_window_exec(struct cmd *self, struct cmdq_item *item) } cmd_find_from_session(current, s, 0); server_redraw_session(s); - hooks_insert(s->hooks, item, current, "after-select-window"); + cmdq_insert_hook(s, item, current, "after-select-window"); } else { /* * If -T and select-window is invoked on same window as @@ -137,7 +137,7 @@ cmd_select_window_exec(struct cmd *self, struct cmdq_item *item) cmd_find_from_session(current, s, 0); server_redraw_session(s); } - hooks_insert(s->hooks, item, current, "after-select-window"); + cmdq_insert_hook(s, item, current, "after-select-window"); } recalculate_sizes(); -- cgit