aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-08-07 10:20:26 +1000
committernyamatongwe <devnull@localhost>2011-08-07 10:20:26 +1000
commit21938a8ea8c456705d09823eb41cce6186276ace (patch)
tree497e56f611a0e33cc9a39451ac35325e924cec32 /src
parentb79f8e1ece65cc7cad7131b89bb286daee8281e2 (diff)
downloadscintilla-mirror-21938a8ea8c456705d09823eb41cce6186276ace.tar.gz
Do not extend decorations when appending to end of document. Bug #3378718.
Diffstat (limited to 'src')
-rw-r--r--src/Decoration.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Decoration.cxx b/src/Decoration.cxx
index 90bde57f2..24632d7c1 100644
--- a/src/Decoration.cxx
+++ b/src/Decoration.cxx
@@ -126,9 +126,13 @@ bool DecorationList::FillRange(int &position, int value, int &fillLength) {
}
void DecorationList::InsertSpace(int position, int insertLength) {
+ const bool atEnd = position == lengthDocument;
lengthDocument += insertLength;
for (Decoration *deco=root; deco; deco = deco->next) {
deco->rs.InsertSpace(position, insertLength);
+ if (atEnd) {
+ deco->rs.FillRange(position, 0, insertLength);
+ }
}
}