changeset 104709:d41cf7441bee

(redisplay_internal): Remove redundant test and collapse both branches into one.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 29 Aug 2009 17:35:56 +0000
parents 2362371c57c2
children a211a43679df
files src/xdisp.c
diffstat 1 files changed, 11 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat Aug 29 15:33:27 2009 +0000
+++ b/src/xdisp.c	Sat Aug 29 17:35:56 2009 +0000
@@ -11658,29 +11658,17 @@
  		    = MATRIX_ROW (w->current_matrix, this_line_vpos + 1);
   		  int delta, delta_bytes;
 
-  		  if (Z - CHARPOS (tlendpos) == ZV)
-		    {
-		      /* This line ends at end of (accessible part of)
-			 buffer.  There is no newline to count.  */
-		      delta = (Z
-			       - CHARPOS (tlendpos)
-			       - MATRIX_ROW_START_CHARPOS (row));
-		      delta_bytes = (Z_BYTE
-				     - BYTEPOS (tlendpos)
-				     - MATRIX_ROW_START_BYTEPOS (row));
-		    }
-  		  else
-		    {
-		      /* This line ends in a newline.  Must take
-			 account of the newline and the rest of the
-			 text that follows.  */
-		      delta = (Z
-			       - CHARPOS (tlendpos)
-			       - MATRIX_ROW_START_CHARPOS (row));
-		      delta_bytes = (Z_BYTE
-				     - BYTEPOS (tlendpos)
-				     - MATRIX_ROW_START_BYTEPOS (row));
-		    }
+		  /* We used to distinguish between two cases here,
+		     conditioned by Z - CHARPOS (tlendpos) == ZV, for
+		     when the line ends in a newline or the end of the
+		     buffer's accessible portion.  But both cases did
+		     the same, so they were collapsed.  */
+		  delta = (Z
+			   - CHARPOS (tlendpos)
+			   - MATRIX_ROW_START_CHARPOS (row));
+		  delta_bytes = (Z_BYTE
+				 - BYTEPOS (tlendpos)
+				 - MATRIX_ROW_START_BYTEPOS (row));
 
   		  increment_matrix_positions (w->current_matrix,
 					      this_line_vpos + 1,