From 212e4f8756c6c7020eac8cf6c5caf9bd276eb19c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 Mar 1998 01:25:20 +0000 Subject: [PATCH] (display_text_line): Handle overlay-arrow correctly. --- src/xdisp.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 9c881cb8b95..95024e79c4a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4025,32 +4025,30 @@ display_text_line (w, start, start_byte, vpos, hpos, taboffset, ovstr_done) if (len > width) len = width; -#ifdef HAVE_FACES - if (!NULL_INTERVAL_P (XSTRING (Voverlay_arrow_string)->intervals)) + + /* If the arrow string has text props, obey them when displaying. */ + for (i = 0, i_byte = 0; i < len; ) { - /* If the arrow string has text props, obey them when displaying. */ - for (i = 0, i_byte = 0; i < len; ) - { - int c; - Lisp_Object face, ilisp; - int newface; + int c; + Lisp_Object face, ilisp; + int newface; + int idx = i; - if (STRING_MULTIBYTE (Voverlay_arrow_string)) - FETCH_STRING_CHAR_ADVANCE (c, Voverlay_arrow_string, i, i_byte); - else - c = XSTRING (Voverlay_arrow_string)->data[i++]; + if (STRING_MULTIBYTE (Voverlay_arrow_string)) + FETCH_STRING_CHAR_ADVANCE (c, Voverlay_arrow_string, i, i_byte); + else + c = XSTRING (Voverlay_arrow_string)->data[i++]; - XSETFASTINT (ilisp, i); + XSETFASTINT (ilisp, i); +#ifdef HAVE_FACES + if (FRAME_WINDOW_P (f)) + { face = Fget_text_property (ilisp, Qface, Voverlay_arrow_string); newface = compute_glyph_face_1 (f, face, 0); - leftmargin[i] = FAST_MAKE_GLYPH (c, newface); + c = FAST_MAKE_GLYPH (c, newface); } - } - else #endif /* HAVE_FACES */ - { - for (i = 0; i < len; i++) - leftmargin[i] = p[i]; + leftmargin[idx] = c; } /* Bug in SunOS 4.1.1 compiler requires this intermediate variable. */ -- 2.39.2