From: Eli Zaretskii Date: Sun, 19 Dec 2021 13:48:30 +0000 (+0200) Subject: Fix last change in 'handle_display_prop' X-Git-Tag: emacs-29.0.90~3577^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec692470bdbd9f673e925bae1c96ad066fb0295a;p=emacs.git Fix last change in 'handle_display_prop' * src/xdisp.c (handle_display_prop): Pass the window's buffer to 'display_min_width' and to 'handle_display_spec'. (Bug#52385) --- diff --git a/src/xdisp.c b/src/xdisp.c index 3a1bc1613f7..0c35d24c262 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5209,9 +5209,8 @@ find_display_property (Lisp_Object disp, Lisp_Object prop) return Qnil; } -static -Lisp_Object get_display_property (ptrdiff_t bufpos, Lisp_Object prop, - Lisp_Object object) +static Lisp_Object +get_display_property (ptrdiff_t bufpos, Lisp_Object prop, Lisp_Object object) { return find_display_property (Fget_text_property (make_fixnum (bufpos), Qdisplay, object), @@ -5364,6 +5363,10 @@ handle_display_prop (struct it *it) propval = get_char_property_and_overlay (make_fixnum (position->charpos), Qdisplay, object, &overlay); + /* Rest of the code must have OBJECT be either a string or a buffer. */ + if (!STRINGP (it->string)) + object = it->w->contents; + /* Handle min-width ends. */ if (!NILP (it->min_width_property) && NILP (find_display_property (propval, Qmin_width))) @@ -5374,9 +5377,6 @@ handle_display_prop (struct it *it) /* Now OVERLAY is the overlay that gave us this property, or nil if it was a text property. */ - if (!STRINGP (it->string)) - object = it->w->contents; - display_replaced = handle_display_spec (it, propval, object, overlay, position, bufpos, FRAME_WINDOW_P (it->f));