diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index ccfac545753..f61b18de444 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5302,22 +5302,26 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5302 | Also flush out if likely to have more than 1k buffered | 5302 | Also flush out if likely to have more than 1k buffered |
| 5303 | otherwise. I'm told that some telnet connections get | 5303 | otherwise. I'm told that some telnet connections get |
| 5304 | really screwed by more than 1k output at once. */ | 5304 | really screwed by more than 1k output at once. */ |
| 5305 | int outq = PENDING_OUTPUT_COUNT (FRAME_TTY (f)->output); | 5305 | FILE *display_output = FRAME_TTY (f)->output; |
| 5306 | if (outq > 900 | 5306 | if (display_output) |
| 5307 | || (outq > 20 && ((i - 1) % preempt_count == 0))) | ||
| 5308 | { | 5307 | { |
| 5309 | fflush (FRAME_TTY (f)->output); | 5308 | int outq = PENDING_OUTPUT_COUNT (display_output); |
| 5310 | if (preempt_count == 1) | 5309 | if (outq > 900 |
| 5310 | || (outq > 20 && ((i - 1) % preempt_count == 0))) | ||
| 5311 | { | 5311 | { |
| 5312 | fflush (display_output); | ||
| 5313 | if (preempt_count == 1) | ||
| 5314 | { | ||
| 5312 | #ifdef EMACS_OUTQSIZE | 5315 | #ifdef EMACS_OUTQSIZE |
| 5313 | if (EMACS_OUTQSIZE (0, &outq) < 0) | 5316 | if (EMACS_OUTQSIZE (0, &outq) < 0) |
| 5314 | /* Probably not a tty. Ignore the error and reset | 5317 | /* Probably not a tty. Ignore the error and reset |
| 5315 | the outq count. */ | 5318 | the outq count. */ |
| 5316 | outq = PENDING_OUTPUT_COUNT (FRAME_TTY (f->output)); | 5319 | outq = PENDING_OUTPUT_COUNT (FRAME_TTY (f->output)); |
| 5317 | #endif | 5320 | #endif |
| 5318 | outq *= 10; | 5321 | outq *= 10; |
| 5319 | if (baud_rate <= outq && baud_rate > 0) | 5322 | if (baud_rate <= outq && baud_rate > 0) |
| 5320 | sleep (outq / baud_rate); | 5323 | sleep (outq / baud_rate); |
| 5324 | } | ||
| 5321 | } | 5325 | } |
| 5322 | } | 5326 | } |
| 5323 | } | 5327 | } |