Thomas Adam
2014-11-26 16:29:02 UTC
window_choose_add_item() was only ever used by choose-item, and hence is no
longer used by anything else.
---
tmux.h | 3 ---
window-choose.c | 30 ------------------------------
2 files changed, 33 deletions(-)
diff --git a/tmux.h b/tmux.h
index 7c0a7b5..317d1d1 100644
--- a/tmux.h
+++ b/tmux.h
@@ -2234,9 +2234,6 @@ struct window_choose_data *window_choose_add_window(struct window_pane *,
struct window_choose_data *window_choose_add_session(struct window_pane *,
struct client *, struct session *, const char *,
const char *, u_int);
-struct window_choose_data *window_choose_add_item(struct window_pane *,
- struct client *, struct winlink *, const char *,
- const char *, u_int);
void window_choose_expand_all(struct window_pane *);
void window_choose_collapse_all(struct window_pane *);
void window_choose_set_current(struct window_pane *, u_int);
diff --git a/window-choose.c b/window-choose.c
index db09287..5601639 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -932,36 +932,6 @@ window_choose_add_session(struct window_pane *wp, struct client *c,
}
struct window_choose_data *
-window_choose_add_item(struct window_pane *wp, struct client *c,
- struct winlink *wl, const char *template, const char *action, u_int idx)
-{
- struct window_choose_data *wcd;
- char *expanded;
-
- wcd = window_choose_data_create(TREE_OTHER, c, c->session);
- wcd->idx = wl->idx;
-
- wcd->ft_template = xstrdup(template);
- format_add(wcd->ft, "line", "%u", idx);
- format_session(wcd->ft, wcd->start_session);
- format_winlink(wcd->ft, wcd->start_session, wl);
- format_window_pane(wcd->ft, wl->window->active);
-
- /*
- * Interpolate action here, since the data we pass back is the expanded
- * template itself.
- */
- xasprintf(&expanded, "%s", format_expand(wcd->ft, wcd->ft_template));
- wcd->command = cmd_template_replace(action, expanded, 1);
- free(expanded);
-
- window_choose_add(wp, wcd);
-
- return (wcd);
-
-}
-
-struct window_choose_data *
window_choose_add_window(struct window_pane *wp, struct client *c,
struct session *s, struct winlink *wl, const char *template,
const char *action, u_int idx)
longer used by anything else.
---
tmux.h | 3 ---
window-choose.c | 30 ------------------------------
2 files changed, 33 deletions(-)
diff --git a/tmux.h b/tmux.h
index 7c0a7b5..317d1d1 100644
--- a/tmux.h
+++ b/tmux.h
@@ -2234,9 +2234,6 @@ struct window_choose_data *window_choose_add_window(struct window_pane *,
struct window_choose_data *window_choose_add_session(struct window_pane *,
struct client *, struct session *, const char *,
const char *, u_int);
-struct window_choose_data *window_choose_add_item(struct window_pane *,
- struct client *, struct winlink *, const char *,
- const char *, u_int);
void window_choose_expand_all(struct window_pane *);
void window_choose_collapse_all(struct window_pane *);
void window_choose_set_current(struct window_pane *, u_int);
diff --git a/window-choose.c b/window-choose.c
index db09287..5601639 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -932,36 +932,6 @@ window_choose_add_session(struct window_pane *wp, struct client *c,
}
struct window_choose_data *
-window_choose_add_item(struct window_pane *wp, struct client *c,
- struct winlink *wl, const char *template, const char *action, u_int idx)
-{
- struct window_choose_data *wcd;
- char *expanded;
-
- wcd = window_choose_data_create(TREE_OTHER, c, c->session);
- wcd->idx = wl->idx;
-
- wcd->ft_template = xstrdup(template);
- format_add(wcd->ft, "line", "%u", idx);
- format_session(wcd->ft, wcd->start_session);
- format_winlink(wcd->ft, wcd->start_session, wl);
- format_window_pane(wcd->ft, wl->window->active);
-
- /*
- * Interpolate action here, since the data we pass back is the expanded
- * template itself.
- */
- xasprintf(&expanded, "%s", format_expand(wcd->ft, wcd->ft_template));
- wcd->command = cmd_template_replace(action, expanded, 1);
- free(expanded);
-
- window_choose_add(wp, wcd);
-
- return (wcd);
-
-}
-
-struct window_choose_data *
window_choose_add_window(struct window_pane *wp, struct client *c,
struct session *s, struct winlink *wl, const char *template,
const char *action, u_int idx)
--
2.1.3
2.1.3