Commit 28c05b69 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

src/term.c (tty_menu_activate): A better initialization for cursor coordinates.

parent 23c931aa
2014-05-01 Eli Zaretskii <eliz@gnu.org>
* term.c (tty_menu_activate): A better initialization for cursor
coordinates.
2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
* intervals.c: Tighten assertions.
......
......@@ -3240,7 +3240,10 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
/* Turn off the cursor. Otherwise it shows through the menu
panes, which is ugly. */
col = cursorX (tty);
row = cursorY (tty);
tty_hide_cursor (tty);
if (buffers_num_deleted)
menu->text[0][7] = ' ';
onepane = menu->count == 1 && menu->submenu[0];
......@@ -3378,8 +3381,6 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
col = cursorX (tty);
row = cursorY (tty);
}
else
row = -1;
/* Display the help-echo message for the currently-selected menu
item. */
......@@ -3391,8 +3392,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
/* Move the cursor to the beginning of the current menu
item, so that screen readers and other accessibility aids
know where the active region is. */
if (0 <= row)
cursor_to (sf, row, col);
cursor_to (sf, row, col);
tty_hide_cursor (tty);
fflush (tty->output);
prev_menu_help_message = menu_help_message;
......
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