aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-05-01 18:59:42 +0300
committerEli Zaretskii2014-05-01 18:59:42 +0300
commit28c05b699f5290d08a55e9342a5f83b41dd20a8f (patch)
tree51930b0747dcf94ee6ba504d24be78bc6880bd86 /src
parent23c931aa24622cafab8e30c4f779b70f2390a409 (diff)
downloademacs-28c05b699f5290d08a55e9342a5f83b41dd20a8f.tar.gz
emacs-28c05b699f5290d08a55e9342a5f83b41dd20a8f.zip
src/term.c (tty_menu_activate): A better initialization for cursor coordinates.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/term.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 85914939608..17a32a4823f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-05-01 Eli Zaretskii <eliz@gnu.org>
2
3 * term.c (tty_menu_activate): A better initialization for cursor
4 coordinates.
5
12014-05-01 Stefan Monnier <monnier@iro.umontreal.ca> 62014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * intervals.c: Tighten assertions. 8 * intervals.c: Tighten assertions.
diff --git a/src/term.c b/src/term.c
index 3bbb21f1589..12cd2ce8508 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3240,7 +3240,10 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3240 3240
3241 /* Turn off the cursor. Otherwise it shows through the menu 3241 /* Turn off the cursor. Otherwise it shows through the menu
3242 panes, which is ugly. */ 3242 panes, which is ugly. */
3243 col = cursorX (tty);
3244 row = cursorY (tty);
3243 tty_hide_cursor (tty); 3245 tty_hide_cursor (tty);
3246
3244 if (buffers_num_deleted) 3247 if (buffers_num_deleted)
3245 menu->text[0][7] = ' '; 3248 menu->text[0][7] = ' ';
3246 onepane = menu->count == 1 && menu->submenu[0]; 3249 onepane = menu->count == 1 && menu->submenu[0];
@@ -3378,8 +3381,6 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3378 col = cursorX (tty); 3381 col = cursorX (tty);
3379 row = cursorY (tty); 3382 row = cursorY (tty);
3380 } 3383 }
3381 else
3382 row = -1;
3383 3384
3384 /* Display the help-echo message for the currently-selected menu 3385 /* Display the help-echo message for the currently-selected menu
3385 item. */ 3386 item. */
@@ -3391,8 +3392,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3391 /* Move the cursor to the beginning of the current menu 3392 /* Move the cursor to the beginning of the current menu
3392 item, so that screen readers and other accessibility aids 3393 item, so that screen readers and other accessibility aids
3393 know where the active region is. */ 3394 know where the active region is. */
3394 if (0 <= row) 3395 cursor_to (sf, row, col);
3395 cursor_to (sf, row, col);
3396 tty_hide_cursor (tty); 3396 tty_hide_cursor (tty);
3397 fflush (tty->output); 3397 fflush (tty->output);
3398 prev_menu_help_message = menu_help_message; 3398 prev_menu_help_message = menu_help_message;