aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorEli Zaretskii2013-09-22 14:07:12 +0300
committerEli Zaretskii2013-09-22 14:07:12 +0300
commit824682ea459498a5706bb90e2f3cb692fac9aa62 (patch)
tree28c1ca048b7568ba8cc3030b363d3392bc679fbd /src/term.c
parent474163ac51d921be386bea1bf2101d4ec33983a8 (diff)
downloademacs-824682ea459498a5706bb90e2f3cb692fac9aa62.tar.gz
emacs-824682ea459498a5706bb90e2f3cb692fac9aa62.zip
Restore help-echo for menu items, ifdef away unneeded MSDOS code.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/term.c b/src/term.c
index a600a3b33b4..d0fd0722da1 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3361,7 +3361,12 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3361 if (input_status) 3361 if (input_status)
3362 { 3362 {
3363 if (input_status == -1) 3363 if (input_status == -1)
3364 result = TTYM_NO_SELECT; 3364 {
3365 /* Remove the last help-echo, so that it doesn't
3366 re-appear after "Quit". */
3367 show_help_echo (Qnil, Qnil, Qnil, Qnil);
3368 result = TTYM_NO_SELECT;
3369 }
3365 leave = 1; 3370 leave = 1;
3366 } 3371 }
3367 else if (sf->mouse_moved) 3372 else if (sf->mouse_moved)
@@ -3420,20 +3425,22 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3420 state[statecount - 1].pane, 3425 state[statecount - 1].pane,
3421 faces, 1); 3426 faces, 1);
3422 } 3427 }
3423 else 3428
3429 /* Display the help-echo message for the currently-selected menu
3430 item. */
3431 if ((menu_help_message || prev_menu_help_message)
3432 && menu_help_message != prev_menu_help_message)
3424 { 3433 {
3425 if ((menu_help_message || prev_menu_help_message) 3434 help_callback (menu_help_message,
3426 && menu_help_message != prev_menu_help_message) 3435 menu_help_paneno, menu_help_itemno);
3427 { 3436 tty_hide_cursor (tty);
3428 help_callback (menu_help_message, 3437 prev_menu_help_message = menu_help_message;
3429 menu_help_paneno, menu_help_itemno);
3430 tty_hide_cursor (tty);
3431 prev_menu_help_message = menu_help_message;
3432 }
3433 /* We are busy-waiting for the mouse to move, so let's be nice
3434 to other Windows applications by releasing our time slice. */
3435 Sleep (20); /* FIXME */
3436 } 3438 }
3439#if 0
3440 /* We are busy-waiting for the mouse to move, so let's be nice
3441 to other Windows applications by releasing our time slice. */
3442 Sleep (20); /* FIXME */
3443
3437 for (b = 0; b < mouse_button_count && !leave; b++) 3444 for (b = 0; b < mouse_button_count && !leave; b++)
3438 { 3445 {
3439 /* Only leave if user both pressed and released the mouse, and in 3446 /* Only leave if user both pressed and released the mouse, and in
@@ -3447,6 +3454,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3447 } 3454 }
3448 (void) mouse_released (b, &x, &y); 3455 (void) mouse_released (b, &x, &y);
3449 } 3456 }
3457#endif
3450 } 3458 }
3451 3459
3452 mouse_off (); /* FIXME */ 3460 mouse_off (); /* FIXME */