diff options
| author | Eli Zaretskii | 2017-08-07 20:47:53 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-08-07 20:47:53 +0300 |
| commit | 14ea76af5f3596d48747c2437006f6e1abcb67a7 (patch) | |
| tree | 2e0d0478d0fc77f416e30d4f7a5707e289fa7a5f | |
| parent | 2d76cf947972ed95519cbb7c2141ed2f414d7179 (diff) | |
| download | emacs-14ea76af5f3596d48747c2437006f6e1abcb67a7.tar.gz emacs-14ea76af5f3596d48747c2437006f6e1abcb67a7.zip | |
Fix infinite recursion under prettify-symbols-mode and linum-mode
* src/xdisp.c (get_overlay_strings_1)
(handle_single_display_spec, push_prefix_prop): Invalidate the
composition information before starting to iterate on a string.
Otherwise we might think in set_iterator_to_next that we are
delivering characters from a composition, and do all kinds of
nonsensical things, like over-step the string end. (Bug#27761)
| -rw-r--r-- | src/xdisp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 422912e57a6..ad9b29835e7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5248,6 +5248,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, | |||
| 5248 | it->prev_stop = 0; | 5248 | it->prev_stop = 0; |
| 5249 | it->base_level_stop = 0; | 5249 | it->base_level_stop = 0; |
| 5250 | it->string_from_display_prop_p = true; | 5250 | it->string_from_display_prop_p = true; |
| 5251 | it->cmp_it.id = -1; | ||
| 5251 | /* Say that we haven't consumed the characters with | 5252 | /* Say that we haven't consumed the characters with |
| 5252 | `display' property yet. The call to pop_it in | 5253 | `display' property yet. The call to pop_it in |
| 5253 | set_iterator_to_next will clean this up. */ | 5254 | set_iterator_to_next will clean this up. */ |
| @@ -5966,6 +5967,7 @@ get_overlay_strings_1 (struct it *it, ptrdiff_t charpos, bool compute_stop_p) | |||
| 5966 | it->multibyte_p = STRING_MULTIBYTE (it->string); | 5967 | it->multibyte_p = STRING_MULTIBYTE (it->string); |
| 5967 | it->method = GET_FROM_STRING; | 5968 | it->method = GET_FROM_STRING; |
| 5968 | it->from_disp_prop_p = 0; | 5969 | it->from_disp_prop_p = 0; |
| 5970 | it->cmp_it.id = -1; | ||
| 5969 | 5971 | ||
| 5970 | /* Force paragraph direction to be that of the parent | 5972 | /* Force paragraph direction to be that of the parent |
| 5971 | buffer. */ | 5973 | buffer. */ |
| @@ -20506,6 +20508,7 @@ push_prefix_prop (struct it *it, Lisp_Object prop) | |||
| 20506 | it->stop_charpos = 0; | 20508 | it->stop_charpos = 0; |
| 20507 | it->prev_stop = 0; | 20509 | it->prev_stop = 0; |
| 20508 | it->base_level_stop = 0; | 20510 | it->base_level_stop = 0; |
| 20511 | it->cmp_it.id = -1; | ||
| 20509 | 20512 | ||
| 20510 | /* Force paragraph direction to be that of the parent | 20513 | /* Force paragraph direction to be that of the parent |
| 20511 | buffer/string. */ | 20514 | buffer/string. */ |