diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-04-15 16:11:24 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-04-15 16:11:24 +0000 |
commit | 66ca4bda6de75c742937b94bc3b4410cbd7eb23d (patch) | |
tree | 1f74cf42f3853022f477a075b21a87fd819e70d6 /usr.bin/tmux/menu.c | |
parent | 48116670042ba9a3f68db33c0a49a206f3415692 (diff) |
Use mode-style for selected items, like choose modes. GitHub issue 2166.
Diffstat (limited to 'usr.bin/tmux/menu.c')
-rw-r--r-- | usr.bin/tmux/menu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tmux/menu.c b/usr.bin/tmux/menu.c index 822b11390e1..c6794509f83 100644 --- a/usr.bin/tmux/menu.c +++ b/usr.bin/tmux/menu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: menu.c,v 1.21 2020/04/13 18:59:41 nicm Exp $ */ +/* $OpenBSD: menu.c,v 1.22 2020/04/15 16:11:23 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -149,10 +149,14 @@ menu_draw_cb(struct client *c, __unused struct screen_redraw_ctx *ctx0) struct menu *menu = md->menu; struct screen_write_ctx ctx; u_int i, px = md->px, py = md->py; + struct grid_cell gc; + + memcpy(&gc, &grid_default_cell, sizeof gc); + style_apply(&gc, c->session->curw->window->options, "mode-style"); screen_write_start(&ctx, NULL, s); screen_write_clearscreen(&ctx, 8); - screen_write_menu(&ctx, menu, md->choice); + screen_write_menu(&ctx, menu, md->choice, &gc); screen_write_stop(&ctx); for (i = 0; i < screen_size_y(&md->s); i++) |