aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorEli Zaretskii2013-09-18 18:49:42 +0300
committerEli Zaretskii2013-09-18 18:49:42 +0300
commit8a0529f22e612f284129a574c436e2887bdf48dc (patch)
tree949919e90639bcc6c9e436ea3a656e8d09f2d83f /src/term.c
parent0de83597c926dce9180f849f90733544c59269a5 (diff)
downloademacs-8a0529f22e612f284129a574c436e2887bdf48dc.tar.gz
emacs-8a0529f22e612f284129a574c436e2887bdf48dc.zip
Record and use cursor coordinates in menu. Active face and help echo work!
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/term.c b/src/term.c
index 7a0be3da128..a9498cf63c3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2812,6 +2812,8 @@ static const char *menu_help_message, *prev_menu_help_message;
2812 last menu help message. */ 2812 last menu help message. */
2813static int menu_help_paneno, menu_help_itemno; 2813static int menu_help_paneno, menu_help_itemno;
2814 2814
2815static int menu_x, menu_y;
2816
2815typedef struct tty_menu_struct 2817typedef struct tty_menu_struct
2816{ 2818{
2817 int count; 2819 int count;
@@ -2931,13 +2933,12 @@ tty_menu_display (tty_menu *menu, int x, int y, int pn, int *faces,
2931 } 2933 }
2932 else 2934 else
2933 { 2935 {
2934 mx = x; 2936 mx = menu_x;
2935 my = y; 2937 my = menu_y;
2936 } 2938 }
2937#else 2939#else
2938 /* FIXME: need to set mx and my from cursor movement commands. */ 2940 mx = menu_x;
2939 mx = x; 2941 my = menu_y;
2940 my = y;
2941#endif 2942#endif
2942 2943
2943 menu_help_message = NULL; 2944 menu_help_message = NULL;
@@ -3218,6 +3219,8 @@ read_menu_input (struct frame *sf, int *x, int *y, bool *first_time)
3218 *y += dy; 3219 *y += dy;
3219 if (dx != 0 || dy != 0) 3220 if (dx != 0 || dy != 0)
3220 sf->mouse_moved = 1; 3221 sf->mouse_moved = 1;
3222 menu_x = *x;
3223 menu_y = *y;
3221 Sleep (300); 3224 Sleep (300);
3222 return st; 3225 return st;
3223#endif 3226#endif