diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-09-24 21:04:42 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-09-24 21:04:42 +0300 |
commit | 58ecdad0b08d8b8414abee1e5e8c89a384b6306c (patch) | |
tree | 8d05b26acedb83b2582a041a57a2c3829979320a /src/term.c | |
parent | 9fa9bc6a327e55d5a9cfc7e4b03f9dc0c8932669 (diff) | |
download | emacs-58ecdad0b08d8b8414abee1e5e8c89a384b6306c.tar.gz |
Prevent timers from messing up TTY menus
* src/term.c (tty_menu_activate): Inhibit redisplay for as long as
the TTY menu is open. (Bug#21530)
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/term.c b/src/term.c index 8ebb620dd9b..5acc47395db 100644 --- a/src/term.c +++ b/src/term.c @@ -3117,6 +3117,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, Lisp_Object selectface; int first_item = 0; int col, row; + Lisp_Object prev_inhibit_redisplay = Vinhibit_redisplay; USE_SAFE_ALLOCA; /* Don't allow non-positive x0 and y0, lest the menu will wrap @@ -3159,6 +3160,11 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, buffers_num_deleted = 1; } + /* Inhibit redisplay for as long as the menu is active, to avoid + messing the screen if some timer calls sit-for or a similar + function. */ + Vinhibit_redisplay = Qt; + /* Force update of the current frame, so that the desired and the current matrices are identical. */ update_frame_with_menu (sf, -1, -1); @@ -3349,6 +3355,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, if (!kbd_buffer_events_waiting ()) clear_input_pending (); SAFE_FREE (); + Vinhibit_redisplay = prev_inhibit_redisplay; return result; } |