diff src/fringe.c @ 83231:549734260e34

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-714 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-271
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 08 Dec 2004 22:20:27 +0000
parents 2a3f27a45698 6fee0102eafe
children 3dcba0bc766b
line wrap: on
line diff
--- a/src/fringe.c	Sun Nov 28 14:39:06 2004 +0000
+++ b/src/fringe.c	Wed Dec 08 22:20:27 2004 +0000
@@ -810,12 +810,13 @@
 	    arrow_bot = XCDR (pos);
 	}
       else
-	ind = Qnil;
+	/* Anything else means boundary on left and no arrows.  */
+	boundary_top = boundary_bot = Qleft;
     }
 
   if (!NILP (ind))
     {
-      int do_eob = 1, do_bob = 1;
+      int done_top = 0, done_bot = 0;
 
       for (y = 0, rn = 0;
 	   y < yb && rn < nrows;
@@ -836,19 +837,25 @@
 	  row->indicate_bob_p = row->indicate_top_line_p = 0;
 	  row->indicate_eob_p = row->indicate_bottom_line_p = 0;
 
-	  if (!NILP (boundary_top)
-	      && MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)))
-	    row->indicate_bob_p = do_bob, do_bob = 0;
-	  else if (!NILP (arrow_top)
-		   && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn)
-	    row->indicate_top_line_p = 1;
+	  if (!row->mode_line_p)
+	    {
+	      if (!done_top)
+		{
+		  if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)))
+		    row->indicate_bob_p = !NILP (boundary_top);
+		  else
+		    row->indicate_top_line_p = !NILP (arrow_top);
+		  done_top = 1;
+		}
 
-	  if (!NILP (boundary_bot)
-	      && MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)))
-	    row->indicate_eob_p = do_eob, do_eob = 0;
-	  else if (!NILP (arrow_bot)
-		   && y + row->height >= yb)
-	    row->indicate_bottom_line_p = 1;
+	      if (!done_bot)
+		{
+		  if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)))
+		    row->indicate_eob_p = !NILP (boundary_bot), done_bot = 1;
+		  else if (y + row->height >= yb)
+		    row->indicate_bottom_line_p = !NILP (arrow_bot), done_bot = 1;
+		}
+	    }
 
 	  if (indicate_bob_p != row->indicate_bob_p
 	      || indicate_top_line_p != row->indicate_top_line_p
@@ -884,13 +891,13 @@
 	  left = row->left_user_fringe_bitmap;
 	  left_face_id = row->left_user_fringe_face_id;
 	}
+      else if (row->truncated_on_left_p)
+	left = LEFT_TRUNCATION_BITMAP;
       else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
 	left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
 		? LEFT_BRACKET_BITMAP : TOP_LEFT_ANGLE_BITMAP);
       else if (row->indicate_eob_p && EQ (boundary_bot, Qleft))
 	left = BOTTOM_LEFT_ANGLE_BITMAP;
-      else if (row->truncated_on_left_p)
-	left = LEFT_TRUNCATION_BITMAP;
       else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
 	left = CONTINUATION_LINE_BITMAP;
       else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft))
@@ -910,13 +917,13 @@
 	  right = row->right_user_fringe_bitmap;
 	  right_face_id = row->right_user_fringe_face_id;
 	}
+      else if (row->truncated_on_right_p)
+	right = RIGHT_TRUNCATION_BITMAP;
       else if (row->indicate_bob_p && EQ (boundary_top, Qright))
 	right = ((row->indicate_eob_p && EQ (boundary_bot, Qright))
 		 ? RIGHT_BRACKET_BITMAP : TOP_RIGHT_ANGLE_BITMAP);
       else if (row->indicate_eob_p && EQ (boundary_bot, Qright))
 	right = BOTTOM_RIGHT_ANGLE_BITMAP;
-      else if (row->truncated_on_right_p)
-	right = RIGHT_TRUNCATION_BITMAP;
       else if (row->continued_p)
 	right = CONTINUED_LINE_BITMAP;
       else if (row->indicate_top_line_p && EQ (arrow_top, Qright))
@@ -1352,7 +1359,7 @@
 
   if (!NILP (face))
     {
-      face_id = lookup_named_face (SELECTED_FRAME (), face, 'A');
+      face_id = lookup_named_face (SELECTED_FRAME (), face, 'A', 1);
       if (face_id < 0)
 	error ("No such face");
     }