mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Close menu on backspace with TAB flag.
This commit is contained in:
parent
d9fa122fd2
commit
04033add19
9
menu.c
9
menu.c
@ -150,8 +150,11 @@ menu_draw_cb(struct client *c, __unused struct screen_redraw_ctx *ctx0)
|
|||||||
struct screen_write_ctx ctx;
|
struct screen_write_ctx ctx;
|
||||||
u_int i, px = md->px, py = md->py;
|
u_int i, px = md->px, py = md->py;
|
||||||
struct grid_cell gc;
|
struct grid_cell gc;
|
||||||
|
struct format_tree *ft;
|
||||||
|
|
||||||
style_apply(&gc, c->session->curw->window->options, "mode-style", NULL);
|
ft = format_create_from_state(md->item, c, &md->fs);
|
||||||
|
style_apply(&gc, c->session->curw->window->options, "mode-style", ft);
|
||||||
|
format_free(ft);
|
||||||
|
|
||||||
screen_write_start(&ctx, NULL, s);
|
screen_write_start(&ctx, NULL, s);
|
||||||
screen_write_clearscreen(&ctx, 8);
|
screen_write_clearscreen(&ctx, 8);
|
||||||
@ -240,6 +243,10 @@ menu_key_cb(struct client *c, struct key_event *event)
|
|||||||
} while ((name == NULL || *name == '-') && md->choice != old);
|
} while ((name == NULL || *name == '-') && md->choice != old);
|
||||||
c->flags |= CLIENT_REDRAWOVERLAY;
|
c->flags |= CLIENT_REDRAWOVERLAY;
|
||||||
return (0);
|
return (0);
|
||||||
|
case KEYC_BSPACE:
|
||||||
|
if (~md->flags & MENU_TAB)
|
||||||
|
break;
|
||||||
|
return (1);
|
||||||
case '\011': /* Tab */
|
case '\011': /* Tab */
|
||||||
if (~md->flags & MENU_TAB)
|
if (~md->flags & MENU_TAB)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user