From d870823b04a44657c79881110bb22c64607cd0d7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 11 Jun 2013 09:34:45 +1000 Subject: Fix a bug with word wrap where the last line could be shown twice. --- src/Editor.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 389b25346..f02fdf0f1 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4742,6 +4742,8 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { // Update contraction state for inserted and removed lines // lineOfPos should be calculated in context of state before modification, shouldn't it int lineOfPos = pdoc->LineFromPosition(mh.position); + if (mh.position > pdoc->LineStart(lineOfPos)) + lineOfPos++; // Affecting subsequent lines if (mh.linesAdded > 0) { cs.InsertLines(lineOfPos, mh.linesAdded); } else { -- cgit v1.2.3