From: Kim F. Storm Date: Mon, 10 May 2004 11:16:37 +0000 (+0000) Subject: (calc_line_height_property): Use string position when X-Git-Tag: ttn-vms-21-2-B4~6315 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e1704d0a972c94d21cd44b8c92bfb7bd59c10cc;p=emacs.git (calc_line_height_property): Use string position when object is a string. --- diff --git a/src/xdisp.c b/src/xdisp.c index da5f6df7dc8..a9506c66b4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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;