From: Eli Zaretskii Date: Wed, 12 Oct 2011 20:07:59 +0000 (+0200) Subject: Fix bugs #9738 & 9739 with a display string that ends in 2 newlines. X-Git-Tag: emacs-pretest-24.0.91~136 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b00eea75d30f4f4a58a8268f8bb1f84c13b06224;p=emacs.git Fix bugs #9738 & 9739 with a display string that ends in 2 newlines. src/xdisp.c (find_row_edges): Handle the case where ROW comes from a display string and the previous row comes from the same string and is empty. --- diff --git a/src/ChangeLog b/src/ChangeLog index 94664833b9b..cf0644ff039 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-10-12 Eli Zaretskii + + * xdisp.c (find_row_edges): Handle the case where ROW comes from a + display string and the previous row comes from the same string and + is empty. (Bug#9739) (Bug#9738) + 2011-10-12 Stefan Monnier * doc.c (get_doc_string): Encode file name (bug#9735). diff --git a/src/xdisp.c b/src/xdisp.c index b44c2fc765e..01472a6bb02 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18646,7 +18646,12 @@ find_row_edges (struct it *it, struct glyph_row *row, seen_this_string = 1; } else - abort (); + /* If all the glyphs of the previous row were inserted + by redisplay, it means the previous row was + produced from a single newline, which is only + possible if that newline came from the same string + as the one which produced this ROW. */ + seen_this_string = 1; } else { @@ -18662,7 +18667,7 @@ find_row_edges (struct it *it, struct glyph_row *row, seen_this_string = 1; } else - abort (); + seen_this_string = 1; } } /* Take note of each display string that covers a newline only