summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-03-29 01:25:20 +0000
committerRichard M. Stallman <rms@gnu.org>1998-03-29 01:25:20 +0000
commit212e4f8756c6c7020eac8cf6c5caf9bd276eb19c (patch)
treeca6e299463d3de4af344e0847e68ff912b1e72c2
parentc79e04d88b1aaab5e27366a8090b4c0c954bc753 (diff)
downloademacs-212e4f8756c6c7020eac8cf6c5caf9bd276eb19c.tar.gz
(display_text_line): Handle overlay-arrow correctly.
-rw-r--r--src/xdisp.c36
1 files 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. */