From 7e1704d0a972c94d21cd44b8c92bfb7bd59c10cc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 10 May 2004 11:16:37 +0000 Subject: [PATCH] (calc_line_height_property): Use string position when object is a string. --- src/xdisp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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; -- 2.39.2