diff options
author | nicm <nicm> | 2022-06-16 13:27:39 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-06-16 13:27:39 +0000 |
commit | 7cee982f909d29e7331d35bd9c21d337688b9ea1 (patch) | |
tree | 658539a47b531c1b95bd06f5cc932fba6a4d782e | |
parent | 616bde08ac74d4be0ae06087aa3103df54833f86 (diff) | |
download | rtmux-7cee982f909d29e7331d35bd9c21d337688b9ea1.tar.gz rtmux-7cee982f909d29e7331d35bd9c21d337688b9ea1.tar.bz2 rtmux-7cee982f909d29e7331d35bd9c21d337688b9ea1.zip |
Keep cursor on selected item on menu (useful for blind people), GitHub
issue 3225.
-rw-r--r-- | menu.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); } |