[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 b1e92c59ed: Avoid assertion violations in 'pop_it'
From: |
Eli Zaretskii |
Subject: |
emacs-28 b1e92c59ed: Avoid assertion violations in 'pop_it' |
Date: |
Wed, 28 Sep 2022 09:47:35 -0400 (EDT) |
branch: emacs-28
commit b1e92c59ede2e67e36531a35ecb4ccabeaa68ff6
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Avoid assertion violations in 'pop_it'
* src/xdisp.c (pop_it): Avoid assertion violations when handling
lists or vectors of display properties. (Bug#58122)
---
src/xdisp.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 6d42105474..f5f3a811e9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6755,7 +6755,14 @@ pop_it (struct it *it)
|| (STRINGP (it->object)
&& IT_STRING_CHARPOS (*it) == it->bidi_it.charpos
&& IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos)
- || (CONSP (it->object) && it->method == GET_FROM_STRETCH));
+ || (CONSP (it->object) && it->method == GET_FROM_STRETCH)
+ /* We could be in the middle of handling a list or a
+ vector of several 'display' properties, in which
+ case we should only verify the above conditions when
+ we pop the iterator stack the last time, because
+ higher stack levels cannot "iterate out of the
+ display property". */
+ || it->sp > 0);
}
/* If we move the iterator over text covered by a display property
to a new buffer position, any info about previously seen overlays
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 b1e92c59ed: Avoid assertion violations in 'pop_it',
Eli Zaretskii <=