Commit 14ea76af authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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)
parent 2d76cf94
......@@ -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. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment