diff options
| author | Richard M. Stallman | 2002-07-23 19:31:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-07-23 19:31:18 +0000 |
| commit | 1987b083563d73dd97ea6524a7d8496c8a3ed1ed (patch) | |
| tree | e344fdc283dac5f689f555ed41b479d319fa2500 /src | |
| parent | fa1735d766e667ee34aadf7acea422acb9f1bfc4 (diff) | |
| download | emacs-1987b083563d73dd97ea6524a7d8496c8a3ed1ed.tar.gz emacs-1987b083563d73dd97ea6524a7d8496c8a3ed1ed.zip | |
(redisplay_updating_p): New variable.
(init_iterator): Don't free realized faces when
redisplay_updating_p is set.
(redisplay_internal): Set redisplay_updating_p while updating the display.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f8139626d79..5c8b786f410 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -690,6 +690,25 @@ enum move_it_result | |||
| 690 | MOVE_NEWLINE_OR_CR | 690 | MOVE_NEWLINE_OR_CR |
| 691 | }; | 691 | }; |
| 692 | 692 | ||
| 693 | /* This counter is used to clear the face cache every once in a while | ||
| 694 | in redisplay_internal. It is incremented for each redisplay. | ||
| 695 | Every CLEAR_FACE_CACHE_COUNT full redisplays, the face cache is | ||
| 696 | cleared. */ | ||
| 697 | |||
| 698 | #define CLEAR_FACE_CACHE_COUNT 500 | ||
| 699 | static int clear_face_cache_count; | ||
| 700 | |||
| 701 | /* Record the previous terminal frame we displayed. */ | ||
| 702 | |||
| 703 | static struct frame *previous_terminal_frame; | ||
| 704 | |||
| 705 | /* Non-zero while redisplay_internal is in progress. */ | ||
| 706 | |||
| 707 | int redisplaying_p; | ||
| 708 | |||
| 709 | /* Non-zero while redisplay is updating the display. */ | ||
| 710 | |||
| 711 | int redisplay_updating_p; | ||
| 693 | 712 | ||
| 694 | 713 | ||
| 695 | /* Function prototypes. */ | 714 | /* Function prototypes. */ |
| @@ -1503,8 +1522,9 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) | |||
| 1503 | 1522 | ||
| 1504 | /* If face attributes have been changed since the last redisplay, | 1523 | /* If face attributes have been changed since the last redisplay, |
| 1505 | free realized faces now because they depend on face definitions | 1524 | free realized faces now because they depend on face definitions |
| 1506 | that might have changed. */ | 1525 | that might have changed. Don't free faces while there might be |
| 1507 | if (face_change_count) | 1526 | desired matrices pending which reference these faces. */ |
| 1527 | if (face_change_count && !redisplay_updating_p) | ||
| 1508 | { | 1528 | { |
| 1509 | face_change_count = 0; | 1529 | face_change_count = 0; |
| 1510 | free_all_realized_faces (Qnil); | 1530 | free_all_realized_faces (Qnil); |
| @@ -8288,23 +8308,6 @@ debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) | |||
| 8288 | #endif /* GLYPH_DEBUG */ | 8308 | #endif /* GLYPH_DEBUG */ |
| 8289 | 8309 | ||
| 8290 | 8310 | ||
| 8291 | /* This counter is used to clear the face cache every once in a while | ||
| 8292 | in redisplay_internal. It is incremented for each redisplay. | ||
| 8293 | Every CLEAR_FACE_CACHE_COUNT full redisplays, the face cache is | ||
| 8294 | cleared. */ | ||
| 8295 | |||
| 8296 | #define CLEAR_FACE_CACHE_COUNT 500 | ||
| 8297 | static int clear_face_cache_count; | ||
| 8298 | |||
| 8299 | /* Record the previous terminal frame we displayed. */ | ||
| 8300 | |||
| 8301 | static struct frame *previous_terminal_frame; | ||
| 8302 | |||
| 8303 | /* Non-zero while redisplay_internal is in progress. */ | ||
| 8304 | |||
| 8305 | int redisplaying_p; | ||
| 8306 | |||
| 8307 | |||
| 8308 | /* Value is non-zero if all changes in window W, which displays | 8311 | /* Value is non-zero if all changes in window W, which displays |
| 8309 | current_buffer, are in the text between START and END. START is a | 8312 | current_buffer, are in the text between START and END. START is a |
| 8310 | buffer position, END is given as a distance from Z. Used in | 8313 | buffer position, END is given as a distance from Z. Used in |
| @@ -8515,6 +8518,7 @@ redisplay_internal (preserve_echo_area) | |||
| 8515 | retry: | 8518 | retry: |
| 8516 | pause = 0; | 8519 | pause = 0; |
| 8517 | reconsider_clip_changes (w, current_buffer); | 8520 | reconsider_clip_changes (w, current_buffer); |
| 8521 | redisplay_updating_p = 0; | ||
| 8518 | 8522 | ||
| 8519 | /* If new fonts have been loaded that make a glyph matrix adjustment | 8523 | /* If new fonts have been loaded that make a glyph matrix adjustment |
| 8520 | necessary, do it. */ | 8524 | necessary, do it. */ |
| @@ -9003,7 +9007,8 @@ redisplay_internal (preserve_echo_area) | |||
| 9003 | 9007 | ||
| 9004 | /* Compare desired and current matrices, perform output. */ | 9008 | /* Compare desired and current matrices, perform output. */ |
| 9005 | update: | 9009 | update: |
| 9006 | 9010 | redisplay_updating_p = 1; | |
| 9011 | |||
| 9007 | /* If fonts changed, display again. */ | 9012 | /* If fonts changed, display again. */ |
| 9008 | if (fonts_changed_p) | 9013 | if (fonts_changed_p) |
| 9009 | goto retry; | 9014 | goto retry; |
| @@ -9128,8 +9133,8 @@ redisplay_internal (preserve_echo_area) | |||
| 9128 | if (windows_or_buffers_changed && !pause) | 9133 | if (windows_or_buffers_changed && !pause) |
| 9129 | goto retry; | 9134 | goto retry; |
| 9130 | 9135 | ||
| 9131 | end_of_redisplay:; | 9136 | end_of_redisplay: |
| 9132 | 9137 | redisplay_updating_p = 0; | |
| 9133 | unbind_to (count, Qnil); | 9138 | unbind_to (count, Qnil); |
| 9134 | } | 9139 | } |
| 9135 | 9140 | ||