# HG changeset patch # User Richard M. Stallman # Date 765338678 0 # Node ID ba0c1af167e6992dd1a59682bca0232ca859cdff # Parent 8e2379ce4fcbc96f07d72f9a4c45ebc62f4c0454 (verify_charstarts): Count right for continued lines. diff -r 8e2379ce4fcb -r ba0c1af167e6 src/dispnew.c --- 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++; + } } }