mirror of
https://github.com/tmux/tmux.git
synced 2024-11-18 02:18:53 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
677bb168a9
@ -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);
|
title = format_single(NULL, args_get(args, 'T'), c, s, wl, wp);
|
||||||
else
|
else
|
||||||
title = xstrdup("");
|
title = xstrdup("");
|
||||||
menu = menu_create_from_string(string, c, fs, title);
|
menu = menu_create(string, c, fs, title);
|
||||||
free(title);
|
free(title);
|
||||||
if (menu == NULL) {
|
if (menu == NULL) {
|
||||||
cmdq_error(item, "invalid menu %s", string);
|
cmdq_error(item, "invalid menu %s", string);
|
||||||
|
20
menu.c
20
menu.c
@ -103,24 +103,8 @@ menu_parse_item(struct menu *menu, const char *s, struct client *c,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct menu *
|
struct menu *
|
||||||
menu_create_from_items(struct menu_item *items, u_int count, struct client *c,
|
menu_create(const char *s, struct client *c, struct cmd_find_state *fs,
|
||||||
struct cmd_find_state *fs, const char *title)
|
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)
|
|
||||||
{
|
{
|
||||||
struct menu *menu;
|
struct menu *menu;
|
||||||
char *copy, *string, *next;
|
char *copy, *string, *next;
|
||||||
|
4
tmux.h
4
tmux.h
@ -2555,9 +2555,7 @@ __dead void printflike(1, 2) fatal(const char *, ...);
|
|||||||
__dead void printflike(1, 2) fatalx(const char *, ...);
|
__dead void printflike(1, 2) fatalx(const char *, ...);
|
||||||
|
|
||||||
/* menu.c */
|
/* menu.c */
|
||||||
struct menu *menu_create_from_items(struct menu_item *, u_int,
|
struct menu *menu_create(const char *, struct client *,
|
||||||
struct client *, struct cmd_find_state *, const char *);
|
|
||||||
struct menu *menu_create_from_string(const char *, struct client *,
|
|
||||||
struct cmd_find_state *, const char *);
|
struct cmd_find_state *, const char *);
|
||||||
void menu_free(struct menu *);
|
void menu_free(struct menu *);
|
||||||
int menu_display(struct menu *, int, struct cmdq_item *, u_int,
|
int menu_display(struct menu *, int, struct cmdq_item *, u_int,
|
||||||
|
Loading…
Reference in New Issue
Block a user