From 2e8907d3976eab6cd7eff620c050e39503171ffc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 3 Apr 1994 02:04:38 +0000 Subject: [PATCH] (verify_charstarts): Count right for continued lines. --- src/dispnew.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dispnew.c b/src/dispnew.c index 68e9423fcbd..856659483a4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -960,7 +960,15 @@ verify_charstarts (w) 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++; + } } } -- 2.39.5