Keep cursor on selected item on menu (useful for blind people), GitHub

issue 3225.
pull/3247/head
nicm 2022-06-16 13:27:39 +00:00
parent 616bde08ac
commit 7cee982f90
1 changed files with 7 additions and 2 deletions

9
menu.c
View File

@ -160,11 +160,16 @@ menu_free(struct menu *menu)
}
struct screen *
menu_mode_cb(__unused struct client *c, void *data, __unused u_int *cx,
__unused u_int *cy)
menu_mode_cb(__unused struct client *c, void *data, u_int *cx, u_int *cy)
{
struct menu_data *md = data;
*cx = md->px + 2;
if (md->choice == -1)
*cy = md->py;
else
*cy = md->py + 1 + md->choice;
return (&md->s);
}