diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-03-19 14:23:59 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-03-19 14:23:59 +0000 |
commit | 7216f77f80f50cebde498eb0a2a2a277ac560b0f (patch) | |
tree | 5460fb8c48eccc9c33fc1596155e57a941ee000a /usr.bin/tmux/menu.c | |
parent | 7030ee3aec5966e797d9bcaaf155d0e910ef0342 (diff) |
Little bit of tidying.
Diffstat (limited to 'usr.bin/tmux/menu.c')
-rw-r--r-- | usr.bin/tmux/menu.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/tmux/menu.c b/usr.bin/tmux/menu.c index 6bb595a4ae7..1254d2c781d 100644 --- a/usr.bin/tmux/menu.c +++ b/usr.bin/tmux/menu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: menu.c,v 1.12 2019/09/16 13:27:14 nicm Exp $ */ +/* $OpenBSD: menu.c,v 1.13 2020/03/19 14:23:58 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -138,16 +138,13 @@ menu_draw_cb(struct client *c, __unused struct screen_redraw_ctx *ctx0) struct screen *s = &md->s; struct menu *menu = md->menu; struct screen_write_ctx ctx; - u_int i, px, py; + u_int i, px = md->px, py = md->py; screen_write_start(&ctx, NULL, s); screen_write_clearscreen(&ctx, 8); screen_write_menu(&ctx, menu, md->choice); screen_write_stop(&ctx); - px = md->px; - py = md->py; - for (i = 0; i < screen_size_y(&md->s); i++) tty_draw_line(tty, NULL, s, 0, i, menu->width + 4, px, py + i); @@ -270,7 +267,6 @@ chosen: pr = cmd_parse_from_string(item->command, NULL); switch (pr->status) { case CMD_PARSE_EMPTY: - new_item = NULL; break; case CMD_PARSE_ERROR: new_item = cmdq_get_error(pr->error); |