[Top][All Lists]

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

master ec69247: Fix last change in 'handle_display_prop'

From: Eli Zaretskii
Subject: master ec69247: Fix last change in 'handle_display_prop'
Date: Sun, 19 Dec 2021 08:49:18 -0500 (EST)

branch: master
commit ec692470bdbd9f673e925bae1c96ad066fb0295a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
 src/xdisp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 3a1bc16..0c35d24 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5209,9 +5209,8 @@ find_display_property (Lisp_Object disp, Lisp_Object prop)
     return Qnil;
-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));

reply via email to

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