]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc_line_height_property): Use string position when
authorKim F. Storm <storm@cua.dk>
Mon, 10 May 2004 11:16:37 +0000 (11:16 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 10 May 2004 11:16:37 +0000 (11:16 +0000)
object is a string.

src/xdisp.c

index da5f6df7dc8cf8ba9a17f9f9c7a3bebb5a3fdefa..a9506c66b4de452e505a1862ef8cf3b10bd2e75a 100644 (file)
@@ -18529,12 +18529,16 @@ calc_line_height_property (it, prop, font, boff, total)
      XFontStruct *font;
      int boff, *total;
 {
-  Lisp_Object val;
+  Lisp_Object position, val;
   Lisp_Object face_name = Qnil;
   int ascent, descent, height, override;
 
-  val = Fget_char_property (make_number (IT_CHARPOS (*it)),
-                           prop, it->object);
+  if (STRINGP (it->object))
+    position = make_number (IT_STRING_CHARPOS (*it));
+  else
+    position = make_number (IT_CHARPOS (*it));
+
+  val = Fget_char_property (position, prop, it->object);
 
   if (NILP (val))
     return val;