From: Eli Zaretskii Date: Sat, 9 Jul 2022 10:26:05 +0000 (+0300) Subject: Avoid assertion violations in 'back_to_previous_visible_line_start' X-Git-Tag: emacs-29.0.90~1447^2~821^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9de00e5fda2e04316357bd8cf0d8094c63ff171b;p=emacs.git Avoid assertion violations in 'back_to_previous_visible_line_start' * src/xdisp.c (back_to_previous_visible_line_start): Avoid assertion violations when narrowed_begv is in effect. --- diff --git a/src/xdisp.c b/src/xdisp.c index 84203f0ed0c..ac76917eb3f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7226,7 +7226,8 @@ back_to_previous_visible_line_start (struct it *it) it->continuation_lines_width = 0; eassert (IT_CHARPOS (*it) >= BEGV); - eassert (IT_CHARPOS (*it) == BEGV + eassert (it->narrowed_begv > BEGV + || IT_CHARPOS (*it) == BEGV || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); CHECK_IT (it); }