diff options
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index bd48e1f3e55..a7f7baa6e3c 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3121,9 +3121,7 @@ save_and_enable_current_matrix (struct frame *f) | |||
| 3121 | static void | 3121 | static void |
| 3122 | restore_desired_matrix (struct frame *f, struct glyph_matrix *saved) | 3122 | restore_desired_matrix (struct frame *f, struct glyph_matrix *saved) |
| 3123 | { | 3123 | { |
| 3124 | int i; | 3124 | for (int i = 0; i < saved->nrows; ++i) |
| 3125 | |||
| 3126 | for (i = 0; i < saved->nrows; ++i) | ||
| 3127 | { | 3125 | { |
| 3128 | struct glyph_row *from = saved->rows + i; | 3126 | struct glyph_row *from = saved->rows + i; |
| 3129 | struct glyph_row *to = f->desired_matrix->rows + i; | 3127 | struct glyph_row *to = f->desired_matrix->rows + i; |
| @@ -3133,7 +3131,23 @@ restore_desired_matrix (struct frame *f, struct glyph_matrix *saved) | |||
| 3133 | memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes); | 3131 | memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes); |
| 3134 | to->used[TEXT_AREA] = from->used[TEXT_AREA]; | 3132 | to->used[TEXT_AREA] = from->used[TEXT_AREA]; |
| 3135 | to->enabled_p = from->enabled_p; | 3133 | to->enabled_p = from->enabled_p; |
| 3136 | to->hash = from->hash; | 3134 | |
| 3135 | bool need_new_hash = false; | ||
| 3136 | for (int x = 0; x < f->desired_matrix->matrix_w; ++x) | ||
| 3137 | { | ||
| 3138 | struct glyph *glyph = to->glyphs[0] + x; | ||
| 3139 | if (!FRAME_LIVE_P (glyph->frame)) | ||
| 3140 | { | ||
| 3141 | glyph->frame = f; | ||
| 3142 | glyph->face_id = DEFAULT_FACE_ID; | ||
| 3143 | need_new_hash = true; | ||
| 3144 | } | ||
| 3145 | } | ||
| 3146 | |||
| 3147 | if (need_new_hash) | ||
| 3148 | to->hash = row_hash (to); | ||
| 3149 | else | ||
| 3150 | to->hash = from->hash; | ||
| 3137 | } | 3151 | } |
| 3138 | } | 3152 | } |
| 3139 | 3153 | ||