From: Eli Zaretskii Date: Mon, 17 Oct 2011 17:03:20 +0000 (+0200) Subject: Fix part 4 of bug#9771 with assertion violation when wrap-prefix is used X-Git-Tag: emacs-pretest-24.0.91~104 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2c91f553b734ed0e2c624e39710385fe5237ff96;p=emacs.git Fix part 4 of bug#9771 with assertion violation when wrap-prefix is used for a line that begins with control characters. src/xdisp.c (push_display_prop): Determine whether to record string or buffer position by IT->string, not by IT->method. Allow GET_FROM_DISPLAY_VECTOR as IT->method on entry. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2c72e97b7f7..53e67a30c38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-10-17 Eli Zaretskii + + * xdisp.c (push_display_prop): Determine whether to record string + or buffer position by IT->string, not by IT->method. Allow + GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4) + 2011-10-15 Martin Rudalics * window.c (coordinates_in_window): Rewrite and delabelize diff --git a/src/xdisp.c b/src/xdisp.c index 13bb0f79e18..e796eb98f19 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18427,9 +18427,10 @@ static int push_display_prop (struct it *it, Lisp_Object prop) { struct text_pos pos = - (it->method == GET_FROM_STRING) ? it->current.string_pos : it->current.pos; + STRINGP (it->string) ? it->current.string_pos : it->current.pos; xassert (it->method == GET_FROM_BUFFER + || it->method == GET_FROM_DISPLAY_VECTOR || it->method == GET_FROM_STRING); /* We need to save the current buffer/string position, so it will be