comparison src/xdisp.c @ 55485:5f04932ca17c

(calc_line_height_property): Use string position when object is a string.
author Kim F. Storm <storm@cua.dk>
date Mon, 10 May 2004 11:16:37 +0000
parents cec2c6c3bafb
children 5b5102265ed8 d895a49cccb9
comparison
equal deleted inserted replaced
55484:88b7471d7c2b 55485:5f04932ca17c
18527 struct it *it; 18527 struct it *it;
18528 Lisp_Object prop; 18528 Lisp_Object prop;
18529 XFontStruct *font; 18529 XFontStruct *font;
18530 int boff, *total; 18530 int boff, *total;
18531 { 18531 {
18532 Lisp_Object val; 18532 Lisp_Object position, val;
18533 Lisp_Object face_name = Qnil; 18533 Lisp_Object face_name = Qnil;
18534 int ascent, descent, height, override; 18534 int ascent, descent, height, override;
18535 18535
18536 val = Fget_char_property (make_number (IT_CHARPOS (*it)), 18536 if (STRINGP (it->object))
18537 prop, it->object); 18537 position = make_number (IT_STRING_CHARPOS (*it));
18538 else
18539 position = make_number (IT_CHARPOS (*it));
18540
18541 val = Fget_char_property (position, prop, it->object);
18538 18542
18539 if (NILP (val)) 18543 if (NILP (val))
18540 return val; 18544 return val;
18541 18545
18542 if (total && CONSP (val) && EQ (XCAR (val), Qtotal)) 18546 if (total && CONSP (val) && EQ (XCAR (val), Qtotal))