=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-tree.c,v retrieving revision 1.32 retrieving revision 1.33 diff -c -r1.32 -r1.33 *** src/usr.bin/tmux/window-tree.c 2018/12/18 13:20:44 1.32 --- src/usr.bin/tmux/window-tree.c 2019/03/07 20:24:21 1.33 *************** *** 1,4 **** ! /* $OpenBSD: window-tree.c,v 1.32 2018/12/18 13:20:44 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-tree.c,v 1.33 2019/03/07 20:24:21 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott *************** *** 24,34 **** #include "tmux.h" ! static struct screen *window_tree_init(struct window_pane *, struct cmd_find_state *, struct args *); ! static void window_tree_free(struct window_pane *); ! static void window_tree_resize(struct window_pane *, u_int, u_int); ! static void window_tree_key(struct window_pane *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *); --- 24,35 ---- #include "tmux.h" ! static struct screen *window_tree_init(struct window_mode_entry *, struct cmd_find_state *, struct args *); ! static void window_tree_free(struct window_mode_entry *); ! static void window_tree_resize(struct window_mode_entry *, u_int, ! u_int); ! static void window_tree_key(struct window_mode_entry *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *); *************** *** 810,822 **** } static struct screen * ! window_tree_init(struct window_pane *wp, struct cmd_find_state *fs, struct args *args) { struct window_tree_modedata *data; struct screen *s; ! wp->modedata = data = xcalloc(1, sizeof *data); if (args_has(args, 's')) data->type = WINDOW_TREE_SESSION; --- 811,824 ---- } static struct screen * ! window_tree_init(struct window_mode_entry *wme, struct cmd_find_state *fs, struct args *args) { + struct window_pane *wp = wme->wp; struct window_tree_modedata *data; struct screen *s; ! wme->data = data = xcalloc(1, sizeof *data); if (args_has(args, 's')) data->type = WINDOW_TREE_SESSION; *************** *** 871,879 **** } static void ! window_tree_free(struct window_pane *wp) { ! struct window_tree_modedata *data = wp->modedata; if (data == NULL) return; --- 873,881 ---- } static void ! window_tree_free(struct window_mode_entry *wme) { ! struct window_tree_modedata *data = wme->data; if (data == NULL) return; *************** *** 884,892 **** } static void ! window_tree_resize(struct window_pane *wp, u_int sx, u_int sy) { ! struct window_tree_modedata *data = wp->modedata; mode_tree_resize(data->data, sx, sy); } --- 886,894 ---- } static void ! window_tree_resize(struct window_mode_entry *wme, u_int sx, u_int sy) { ! struct window_tree_modedata *data = wme->data; mode_tree_resize(data->data, sx, sy); } *************** *** 1119,1129 **** } static void ! window_tree_key(struct window_pane *wp, struct client *c, __unused struct session *s, __unused struct winlink *wl, key_code key, struct mouse_event *m) { ! struct window_tree_modedata *data = wp->modedata; struct window_tree_itemdata *item, *new_item; char *name, *prompt = NULL; struct cmd_find_state fs; --- 1121,1132 ---- } static void ! window_tree_key(struct window_mode_entry *wme, struct client *c, __unused struct session *s, __unused struct winlink *wl, key_code key, struct mouse_event *m) { ! struct window_pane *wp = wme->wp; ! struct window_tree_modedata *data = wme->data; struct window_tree_itemdata *item, *new_item; char *name, *prompt = NULL; struct cmd_find_state fs;