diff options
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, | |||
| 3117 | Lisp_Object selectface; | 3117 | Lisp_Object selectface; |
| 3118 | int first_item = 0; | 3118 | int first_item = 0; |
| 3119 | int col, row; | 3119 | int col, row; |
| 3120 | Lisp_Object prev_inhibit_redisplay = Vinhibit_redisplay; | ||
| 3120 | USE_SAFE_ALLOCA; | 3121 | USE_SAFE_ALLOCA; |
| 3121 | 3122 | ||
| 3122 | /* Don't allow non-positive x0 and y0, lest the menu will wrap | 3123 | /* 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, | |||
| 3159 | buffers_num_deleted = 1; | 3160 | buffers_num_deleted = 1; |
| 3160 | } | 3161 | } |
| 3161 | 3162 | ||
| 3163 | /* Inhibit redisplay for as long as the menu is active, to avoid | ||
| 3164 | messing the screen if some timer calls sit-for or a similar | ||
| 3165 | function. */ | ||
| 3166 | Vinhibit_redisplay = Qt; | ||
| 3167 | |||
| 3162 | /* Force update of the current frame, so that the desired and the | 3168 | /* Force update of the current frame, so that the desired and the |
| 3163 | current matrices are identical. */ | 3169 | current matrices are identical. */ |
| 3164 | update_frame_with_menu (sf, -1, -1); | 3170 | update_frame_with_menu (sf, -1, -1); |
| @@ -3349,6 +3355,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3349 | if (!kbd_buffer_events_waiting ()) | 3355 | if (!kbd_buffer_events_waiting ()) |
| 3350 | clear_input_pending (); | 3356 | clear_input_pending (); |
| 3351 | SAFE_FREE (); | 3357 | SAFE_FREE (); |
| 3358 | Vinhibit_redisplay = prev_inhibit_redisplay; | ||
| 3352 | return result; | 3359 | return result; |
| 3353 | } | 3360 | } |
| 3354 | 3361 | ||