diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 56 |
1 files changed, 46 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c index afc4155784a..35e67c45f9e 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2453,7 +2453,15 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2453 | do | 2453 | do |
| 2454 | { | 2454 | { |
| 2455 | int old_timers_run = timers_run; | 2455 | int old_timers_run = timers_run; |
| 2456 | |||
| 2456 | timer_delay = timer_check (1); | 2457 | timer_delay = timer_check (1); |
| 2458 | |||
| 2459 | /* If a timer has run, this might have changed buffers | ||
| 2460 | an alike. Make read_key_sequence aware of that. */ | ||
| 2461 | if (timers_run != old_timers_run | ||
| 2462 | && waiting_for_user_input_p == -1) | ||
| 2463 | record_asynch_buffer_change (); | ||
| 2464 | |||
| 2457 | if (timers_run != old_timers_run && do_display) | 2465 | if (timers_run != old_timers_run && do_display) |
| 2458 | /* We must retry, since a timer may have requeued itself | 2466 | /* We must retry, since a timer may have requeued itself |
| 2459 | and that could alter the time_delay. */ | 2467 | and that could alter the time_delay. */ |
| @@ -2667,14 +2675,28 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2667 | /* If there is any, return immediately | 2675 | /* If there is any, return immediately |
| 2668 | to give it higher priority than subprocesses */ | 2676 | to give it higher priority than subprocesses */ |
| 2669 | 2677 | ||
| 2670 | if (XINT (read_kbd) != 0 | 2678 | if (XINT (read_kbd) != 0) |
| 2671 | && detect_input_pending_run_timers (do_display)) | ||
| 2672 | { | 2679 | { |
| 2673 | swallow_events (do_display); | 2680 | int old_timers_run = timers_run; |
| 2681 | int leave = 0; | ||
| 2682 | |||
| 2674 | if (detect_input_pending_run_timers (do_display)) | 2683 | if (detect_input_pending_run_timers (do_display)) |
| 2675 | break; | 2684 | { |
| 2676 | } | 2685 | swallow_events (do_display); |
| 2686 | if (detect_input_pending_run_timers (do_display)) | ||
| 2687 | leave = 1; | ||
| 2688 | } | ||
| 2677 | 2689 | ||
| 2690 | /* If a timer has run, this might have changed buffers | ||
| 2691 | an alike. Make read_key_sequence aware of that. */ | ||
| 2692 | if (timers_run != old_timers_run | ||
| 2693 | && waiting_for_user_input_p == -1) | ||
| 2694 | record_asynch_buffer_change (); | ||
| 2695 | |||
| 2696 | if (leave) | ||
| 2697 | break; | ||
| 2698 | } | ||
| 2699 | |||
| 2678 | /* If there is unread keyboard input, also return. */ | 2700 | /* If there is unread keyboard input, also return. */ |
| 2679 | if (XINT (read_kbd) != 0 | 2701 | if (XINT (read_kbd) != 0 |
| 2680 | && requeued_events_pending_p ()) | 2702 | && requeued_events_pending_p ()) |
| @@ -4894,14 +4916,28 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 4894 | 4916 | ||
| 4895 | /* Check for keyboard input */ | 4917 | /* Check for keyboard input */ |
| 4896 | 4918 | ||
| 4897 | if ((XINT (read_kbd) != 0) | 4919 | if (XINT (read_kbd) != 0) |
| 4898 | && detect_input_pending_run_timers (do_display)) | ||
| 4899 | { | 4920 | { |
| 4900 | swallow_events (do_display); | 4921 | int old_timers_run = timers_run; |
| 4922 | int leave = 0; | ||
| 4923 | |||
| 4901 | if (detect_input_pending_run_timers (do_display)) | 4924 | if (detect_input_pending_run_timers (do_display)) |
| 4902 | break; | 4925 | { |
| 4903 | } | 4926 | swallow_events (do_display); |
| 4927 | if (detect_input_pending_run_timers (do_display)) | ||
| 4928 | leave = 1; | ||
| 4929 | } | ||
| 4930 | |||
| 4931 | /* If a timer has run, this might have changed buffers | ||
| 4932 | an alike. Make read_key_sequence aware of that. */ | ||
| 4933 | if (timers_run != old_timers_run | ||
| 4934 | && waiting_for_user_input_p == -1) | ||
| 4935 | record_asynch_buffer_change (); | ||
| 4904 | 4936 | ||
| 4937 | if (leave) | ||
| 4938 | break; | ||
| 4939 | } | ||
| 4940 | |||
| 4905 | /* If there is unread keyboard input, also return. */ | 4941 | /* If there is unread keyboard input, also return. */ |
| 4906 | if (XINT (read_kbd) != 0 | 4942 | if (XINT (read_kbd) != 0 |
| 4907 | && requeued_events_pending_p ()) | 4943 | && requeued_events_pending_p ()) |