aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2024-04-21 16:06:34 +0300
committerEli Zaretskii2024-04-21 16:06:34 +0300
commitaed2b7a3d82fd16789befe3c6e4c05e20ed0ae60 (patch)
tree4756671c7fbca4658f80fc7105abfd747645b1a2 /src
parentc929532b4694a1c5d0f61ae77f4e8664706a36a1 (diff)
downloademacs-aed2b7a3d82fd16789befe3c6e4c05e20ed0ae60.tar.gz
emacs-aed2b7a3d82fd16789befe3c6e4c05e20ed0ae60.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h4
-rw-r--r--src/xdisp.c2
2 files changed, 5 insertions, 1 deletions
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
2373 bool_bf string_from_display_prop_p : 1; 2373 bool_bf string_from_display_prop_p : 1;
2374 2374
2375 /* True means `string' comes from a `line-prefix' or `wrap-prefix' 2375 /* True means `string' comes from a `line-prefix' or `wrap-prefix'
2376 property. */ 2376 property, and that these properties were already handled, even if
2377 their value is not a string. This is used to avoid processing
2378 the same line/wrap prefix more than once for the same glyph row. */
2377 bool_bf string_from_prefix_prop_p : 1; 2379 bool_bf string_from_prefix_prop_p : 1;
2378 2380
2379 /* True means we are iterating an object that came from a value of a 2381 /* 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)
24030 { 24030 {
24031 it->method = GET_FROM_STRETCH; 24031 it->method = GET_FROM_STRETCH;
24032 it->object = prop; 24032 it->object = prop;
24033 it->string_from_prefix_prop_p = true;
24033 } 24034 }
24034#ifdef HAVE_WINDOW_SYSTEM 24035#ifdef HAVE_WINDOW_SYSTEM
24035 else if (IMAGEP (prop)) 24036 else if (IMAGEP (prop))
@@ -24037,6 +24038,7 @@ push_prefix_prop (struct it *it, Lisp_Object prop)
24037 it->what = IT_IMAGE; 24038 it->what = IT_IMAGE;
24038 it->image_id = lookup_image (it->f, prop, it->face_id); 24039 it->image_id = lookup_image (it->f, prop, it->face_id);
24039 it->method = GET_FROM_IMAGE; 24040 it->method = GET_FROM_IMAGE;
24041 it->string_from_prefix_prop_p = true;
24040 } 24042 }
24041#endif /* HAVE_WINDOW_SYSTEM */ 24043#endif /* HAVE_WINDOW_SYSTEM */
24042 else 24044 else