diff src/redisplay.c @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 0e522484dd2a
children 83b3d10dcba9
line wrap: on
line diff
--- a/src/redisplay.c	Mon Aug 13 10:16:17 2007 +0200
+++ b/src/redisplay.c	Mon Aug 13 10:17:07 2007 +0200
@@ -934,10 +934,9 @@
   crb->xpos = data->pixpos;
   crb->width = width;
   if (data->bi_bufpos)
-    {
-      struct buffer *buf = XBUFFER (WINDOW_BUFFER (XWINDOW (data->window)));
-      crb->bufpos = bytind_to_bufpos (buf, data->bi_bufpos);
-    }
+    crb->bufpos =
+      bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))),
+			data->bi_bufpos);
   else if (data->is_modeline)
     crb->bufpos = data->modeline_charpos;
   else
@@ -1079,10 +1078,9 @@
   rb.xpos = data->pixpos;
   rb.width = data->blank_width;
   if (data->bi_bufpos)
-    {
-      struct buffer *buf = XBUFFER (WINDOW_BUFFER (XWINDOW (data->window)));
-      rb.bufpos = bytind_to_bufpos (buf, data->bi_bufpos);
-    }
+    rb.bufpos =
+      bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))),
+			data->bi_bufpos);
   else
     /* #### and this is really correct too? */
     rb.bufpos = 0;
@@ -1661,11 +1659,9 @@
       rb.width = width;
       rb.bufpos = 0;			/* glyphs are never "at" anywhere */
       if (data->bi_endpos)
-        {
-	  /* #### is this necessary at all? */
-	  struct buffer *buf = XBUFFER (WINDOW_BUFFER (w));
-	  rb.endpos = bytind_to_bufpos (buf, data->bi_endpos);
-        }
+	/* #### is this necessary at all? */
+	rb.endpos = bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (w)),
+				      data->bi_endpos);
       else
         rb.endpos = 0;
       rb.type = RUNE_DGLYPH;
@@ -1682,10 +1678,8 @@
 
       if (allow_cursor)
 	{
-	  {
-	    struct buffer *buf = XBUFFER (WINDOW_BUFFER (w));
-	    rb.bufpos = bytind_to_bufpos (buf, data->bi_bufpos);
-	  }
+	  rb.bufpos = bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (w)),
+					data->bi_bufpos);
 
 	  if (data->cursor_type == CURSOR_ON)
 	    {
@@ -4807,7 +4801,7 @@
 }
 
 /* Given a window and a point, update the given display lines such
-   that point is displayed in the middle of the window. 
+   that point is displayed in the middle of the window.
    Return the window's new start position. */
 
 static Bufpos