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)
This commit is contained in:
parent
2d76cf9479
commit
14ea76af5f
1 changed files with 3 additions and 0 deletions
|
@ -5248,6 +5248,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
|||
it->prev_stop = 0;
|
||||
it->base_level_stop = 0;
|
||||
it->string_from_display_prop_p = true;
|
||||
it->cmp_it.id = -1;
|
||||
/* Say that we haven't consumed the characters with
|
||||
`display' property yet. The call to pop_it in
|
||||
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)
|
|||
it->multibyte_p = STRING_MULTIBYTE (it->string);
|
||||
it->method = GET_FROM_STRING;
|
||||
it->from_disp_prop_p = 0;
|
||||
it->cmp_it.id = -1;
|
||||
|
||||
/* Force paragraph direction to be that of the parent
|
||||
buffer. */
|
||||
|
@ -20506,6 +20508,7 @@ push_prefix_prop (struct it *it, Lisp_Object prop)
|
|||
it->stop_charpos = 0;
|
||||
it->prev_stop = 0;
|
||||
it->base_level_stop = 0;
|
||||
it->cmp_it.id = -1;
|
||||
|
||||
/* Force paragraph direction to be that of the parent
|
||||
buffer/string. */
|
||||
|
|
Loading…
Add table
Reference in a new issue