summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-05-12 07:27:08 +0000
committernicm <nicm>2019-05-12 07:27:08 +0000
commitc91323e4d6a4bd5f2c646e315d57ead1a7c568ea (patch)
tree00fa4c58b6eea80e82a97e6e3a32df1530bb9d9c
parent198b0a23a21ac1cd30b1e9c23fcc38087c22bd7e (diff)
Remove menu_create_from_items, I thought I would use it for some later
work but I don't need it.
-rw-r--r--cmd-display-menu.c2
-rw-r--r--menu.c20
-rw-r--r--tmux.h4
3 files changed, 4 insertions, 22 deletions
diff --git a/cmd-display-menu.c b/cmd-display-menu.c
index 27bf454d..15b750ee 100644
--- a/cmd-display-menu.c
+++ b/cmd-display-menu.c
@@ -79,7 +79,7 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
title = format_single(NULL, args_get(args, 'T'), c, s, wl, wp);
else
title = xstrdup("");
- menu = menu_create_from_string(string, c, fs, title);
+ menu = menu_create(string, c, fs, title);
free(title);
if (menu == NULL) {
cmdq_error(item, "invalid menu %s", string);
diff --git a/menu.c b/menu.c
index 0443d22f..bd5996da 100644
--- a/menu.c
+++ b/menu.c
@@ -103,24 +103,8 @@ menu_parse_item(struct menu *menu, const char *s, struct client *c,
}
struct menu *
-menu_create_from_items(struct menu_item *items, u_int count, struct client *c,
- struct cmd_find_state *fs, const char *title)
-{
- struct menu *menu;
- u_int i;
-
- menu = xcalloc(1, sizeof *menu);
- menu->title = xstrdup(title);
-
- for (i = 0; i < count; i++)
- menu_add_item(menu, &items[i], c, fs);
-
- return (menu);
-}
-
-struct menu *
-menu_create_from_string(const char *s, struct client *c,
- struct cmd_find_state *fs, const char *title)
+menu_create(const char *s, struct client *c, struct cmd_find_state *fs,
+ const char *title)
{
struct menu *menu;
char *copy, *string, *next;
diff --git a/tmux.h b/tmux.h
index 757e7673..c00a468c 100644
--- a/tmux.h
+++ b/tmux.h
@@ -2551,9 +2551,7 @@ __dead void printflike(1, 2) fatal(const char *, ...);
__dead void printflike(1, 2) fatalx(const char *, ...);
/* menu.c */
-struct menu *menu_create_from_items(struct menu_item *, u_int,
- struct client *, struct cmd_find_state *, const char *);
-struct menu *menu_create_from_string(const char *, struct client *,
+struct menu *menu_create(const char *, struct client *,
struct cmd_find_state *, const char *);
void menu_free(struct menu *);
int menu_display(struct menu *, int, struct cmdq_item *, u_int,