diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/indent.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/indent.c b/src/indent.c index bc59239f20f..1015259cedd 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1162,7 +1162,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1162 | int prev_tab_offset; /* Previous tab offset. */ | 1162 | int prev_tab_offset; /* Previous tab offset. */ |
| 1163 | int continuation_glyph_width; | 1163 | int continuation_glyph_width; |
| 1164 | struct buffer *cache_buffer = current_buffer; | 1164 | struct buffer *cache_buffer = current_buffer; |
| 1165 | struct region_cache *width_cache; | 1165 | struct region_cache *width_cache = NULL; |
| 1166 | 1166 | ||
| 1167 | struct composition_it cmp_it; | 1167 | struct composition_it cmp_it; |
| 1168 | 1168 | ||
| @@ -1170,11 +1170,14 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1170 | 1170 | ||
| 1171 | if (cache_buffer->base_buffer) | 1171 | if (cache_buffer->base_buffer) |
| 1172 | cache_buffer = cache_buffer->base_buffer; | 1172 | cache_buffer = cache_buffer->base_buffer; |
| 1173 | width_cache = width_run_cache_on_off (); | ||
| 1174 | if (dp == buffer_display_table ()) | 1173 | if (dp == buffer_display_table ()) |
| 1175 | width_table = (VECTORP (BVAR (current_buffer, width_table)) | 1174 | { |
| 1176 | ? XVECTOR (BVAR (current_buffer, width_table))->contents | 1175 | width_table = (VECTORP (BVAR (current_buffer, width_table)) |
| 1177 | : 0); | 1176 | ? XVECTOR (BVAR (current_buffer, width_table))->contents |
| 1177 | : 0); | ||
| 1178 | if (width_table) | ||
| 1179 | width_cache = width_run_cache_on_off (); | ||
| 1180 | } | ||
| 1178 | else | 1181 | else |
| 1179 | /* If the window has its own display table, we can't use the width | 1182 | /* If the window has its own display table, we can't use the width |
| 1180 | run cache, because that's based on the buffer's display table. */ | 1183 | run cache, because that's based on the buffer's display table. */ |