diff options
-rw-r--r-- | src/Decoration.cxx | 4 |
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); + } } } |