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.
+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
{
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;
{
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)