aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2013-06-11 09:34:45 +1000
committernyamatongwe <unknown>2013-06-11 09:34:45 +1000
commitb957764e7a15fedd808216544f3bf00d32414bcc (patch)
tree8b4ff3e74c075830c4a7cfb44d0eccbf94c3399c /src/Editor.cxx
parent000ba485228b1b7ad35eb1b3c63cf08189eb7c42 (diff)
downloadscintilla-mirror-b957764e7a15fedd808216544f3bf00d32414bcc.tar.gz
Fix a bug with word wrap where the last line could be shown twice.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx2
1 files changed, 2 insertions, 0 deletions
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 {