aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-02-15 10:50:02 +1100
committernyamatongwe <unknown>2012-02-15 10:50:02 +1100
commite3ffedd71550455afedb886cbfd4d5ef080d18c7 (patch)
tree1a754a3f5054a3d03e4bb1019048c24a3d92f747
parente2e3d8c8e2df15b58fab4d142fa9fefa07a9e53e (diff)
downloadscintilla-mirror-e3ffedd71550455afedb886cbfd4d5ef080d18c7.tar.gz
Bug #3487440. Fix bug where setting an indicator on for whole document
had no effect since that was regarded as an empty indicator.
-rw-r--r--src/Decoration.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Decoration.cxx b/src/Decoration.cxx
index 24632d7c1..b489c3c02 100644
--- a/src/Decoration.cxx
+++ b/src/Decoration.cxx
@@ -28,7 +28,7 @@ Decoration::~Decoration() {
}
bool Decoration::Empty() {
- return rs.Runs() == 1;
+ return (rs.Runs() == 1) && (rs.AllSameAs(0));
}
DecorationList::DecorationList() : currentIndicator(0), currentValue(1), current(0),
@@ -148,7 +148,7 @@ void DecorationList::DeleteRange(int position, int deleteLength) {
void DecorationList::DeleteAnyEmpty() {
Decoration *deco = root;
while (deco) {
- if (deco->Empty()) {
+ if ((lengthDocument == 0) || deco->Empty()) {
Delete(deco->indicator);
deco = root;
} else {