changeset 6645:ba0c1af167e6

(verify_charstarts): Count right for continued lines.
author Richard M. Stallman <rms@gnu.org>
date Sun, 03 Apr 1994 02:04:38 +0000
parents 8e2379ce4fcb
children d3e3efcd8461
files src/dispnew.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Sun Apr 03 02:04:04 1994 +0000
+++ b/src/dispnew.c	Sun Apr 03 02:04:38 1994 +0000
@@ -960,7 +960,15 @@
       for (j = left; j < right; j++)
 	if (charstart[j] > 0)
 	  last = charstart[j];
-      next_line = last + (BUF_ZV (XBUFFER (w->buffer)) != last);
+      /* Record where the next line should start.  */
+      next_line = last;
+      if (BUF_ZV (XBUFFER (w->buffer)) != last)
+	{
+	  /* If there's a newline between the two lines, count that.  */
+	  int endchar = *BUF_CHAR_ADDRESS (XBUFFER (w->buffer), last);
+	  if (endchar == '\n')
+	    next_line++;
+	}
     }
 }