Commit 052bac0b authored by Eli Zaretskii's avatar Eli Zaretskii

Menu item selection on TTYs is now cyclical.

 src/term.c (read_menu_input): Make selection of menu items
 cyclical.  Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
 (tty_menu_activate): Fix off-by-one error when computing max_y.
parent e1f9f9e3
2013-10-11 Eli Zaretskii <eliz@gnu.org>
* term.c (read_menu_input): Make selection of menu items
cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
(tty_menu_activate): Fix off-by-one error when computing max_y.
2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
* gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
......
......@@ -3177,11 +3177,15 @@ read_menu_input (struct frame *sf, int *x, int *y, int min_y, int max_y,
{
if (*y < max_y)
*y += 1;
else
*y = min_y;
}
else if (EQ (cmd, Qtty_menu_prev_item))
{
if (*y > min_y)
*y -= 1;
else
*y = max_y;
}
else if (EQ (cmd, Qtty_menu_select))
st = 1;
......@@ -3290,7 +3294,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
{
int input_status;
int min_y = state[0].y;
int max_y = min (min_y + state[0].menu->count, FRAME_LINES (sf)) - 1;
int max_y = min (min_y + state[0].menu->count, FRAME_LINES (sf) - 1) - 1;
input_status = read_menu_input (sf, &x, &y, min_y, max_y, &first_time);
if (input_status)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment