changeset 57558:97a5853254e0

(overlay_arrow_at_row): Return overlay string rather than bitmap if there is not left fringe. (get_overlay_arrow_glyph_row): Also used on windows system. (display_line): Display overlay string if no left fringe.
author Kim F. Storm <storm@cua.dk>
date Sun, 17 Oct 2004 13:17:00 +0000
parents 13225583da0d
children 07791c7d465b
files src/xdisp.c
diffstat 1 files changed, 17 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sun Oct 17 13:16:31 2004 +0000
+++ b/src/xdisp.c	Sun Oct 17 13:17:00 2004 +0000
@@ -9523,11 +9523,13 @@
 }
 
 
-/* Return overlay arrow string at row, or nil.  */
+/* Return overlay arrow string to display at row.
+   Return t if display as bitmap in left fringe.
+   Return nil if no overlay arrow.  */
 
 static Lisp_Object
-overlay_arrow_at_row (f, row, pbitmap)
-     struct frame *f;
+overlay_arrow_at_row (it, row, pbitmap)
+     struct it *it;
      struct glyph_row *row;
      int *pbitmap;
 {
@@ -9550,9 +9552,10 @@
 	  && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
 	{
 	  val = overlay_arrow_string_or_property (var, pbitmap);
-	  if (FRAME_WINDOW_P (f))
+	  if (FRAME_WINDOW_P (it->f)
+	      && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
 	    return Qt;
-	  else if (STRINGP (val))
+	  if (STRINGP (val))
 	    return val;
 	  break;
 	}
@@ -14073,8 +14076,8 @@
 		     Building Desired Matrix Rows
  ***********************************************************************/
 
-/* Return a temporary glyph row holding the glyphs of an overlay
-   arrow.  Only used for non-window-redisplay windows.  */
+/* Return a temporary glyph row holding the glyphs of an overlay arrow.
+   Used for non-window-redisplay windows, and for windows w/o left fringe.  */
 
 static struct glyph_row *
 get_overlay_arrow_glyph_row (w, overlay_arrow_string)
@@ -14955,11 +14958,11 @@
      better to let it be displayed like cursors under X.  */
   if (! overlay_arrow_seen
       && (overlay_arrow_string
-	    = overlay_arrow_at_row (it->f, row, &overlay_arrow_bitmap),
+	    = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap),
 	  !NILP (overlay_arrow_string)))
     {
       /* Overlay arrow in window redisplay is a fringe bitmap.  */
-      if (!FRAME_WINDOW_P (it->f))
+      if (STRINGP (overlay_arrow_string))
 	{
 	  struct glyph_row *arrow_row
 	    = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string);
@@ -14984,10 +14987,12 @@
 	      row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA];
 	    }
 	}
-
+      else
+	{
+	  it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;
+	  row->overlay_arrow_p = 1;
+	}
       overlay_arrow_seen = 1;
-      it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;
-      row->overlay_arrow_p = 1;
     }
 
   /* Compute pixel dimensions of this line.  */