From 9de00e5fda2e04316357bd8cf0d8094c63ff171b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 9 Jul 2022 13:26:05 +0300 Subject: [PATCH] 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. --- src/xdisp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.2