emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 aed2b7a3d82: Avoid assertion violations in 'push_prefix_prop'


From: Eli Zaretskii
Subject: emacs-29 aed2b7a3d82: Avoid assertion violations in 'push_prefix_prop'
Date: Sun, 21 Apr 2024 09:07:57 -0400 (EDT)

branch: emacs-29
commit aed2b7a3d82fd16789befe3c6e4c05e20ed0ae60
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Avoid assertion violations in 'push_prefix_prop'
    
    * src/xdisp.c (push_prefix_prop): Set the
    'string_from_prefix_prop_p' flag for any valid value of the
    'line-prefix' or 'wrap-prefix' property/variable.  (Bug#70495)
---
 src/dispextern.h | 4 +++-
 src/xdisp.c      | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/dispextern.h b/src/dispextern.h
index de46658dc0a..1590fa64436 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2373,7 +2373,9 @@ struct it
   bool_bf string_from_display_prop_p : 1;
 
   /* True means `string' comes from a `line-prefix' or `wrap-prefix'
-     property.  */
+     property, and that these properties were already handled, even if
+     their value is not a string.  This is used to avoid processing
+     the same line/wrap prefix more than once for the same glyph row.  */
   bool_bf string_from_prefix_prop_p : 1;
 
   /* True means we are iterating an object that came from a value of a
diff --git a/src/xdisp.c b/src/xdisp.c
index a9eb47720d0..6e945ed114b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -24030,6 +24030,7 @@ push_prefix_prop (struct it *it, Lisp_Object prop)
     {
       it->method = GET_FROM_STRETCH;
       it->object = prop;
+      it->string_from_prefix_prop_p = true;
     }
 #ifdef HAVE_WINDOW_SYSTEM
   else if (IMAGEP (prop))
@@ -24037,6 +24038,7 @@ push_prefix_prop (struct it *it, Lisp_Object prop)
       it->what = IT_IMAGE;
       it->image_id = lookup_image (it->f, prop, it->face_id);
       it->method = GET_FROM_IMAGE;
+      it->string_from_prefix_prop_p = true;
     }
 #endif /* HAVE_WINDOW_SYSTEM */
   else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]