mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
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.
This commit is contained in:
parent
e1f9f9e3d8
commit
052bac0bf1
@ -1,3 +1,9 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user