aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CellBuffer.cxx2
-rw-r--r--src/ContractionState.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index a6c0cf577..bd124d011 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -225,7 +225,7 @@ void LineVector::InsertValue(int pos, int value) {
} else if (pos == (lines - 1)) { // Last line will not be a folder
levels[pos] = SC_FOLDLEVELBASE;
} else {
- levels[pos] = levels[pos - 1];
+ levels[pos] = levels[pos - 1] & ~SC_FOLDLEVELWHITEFLAG;
}
}
}
diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx
index 3d021b080..49148317c 100644
--- a/src/ContractionState.cxx
+++ b/src/ContractionState.cxx
@@ -208,11 +208,11 @@ bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible
if (lines[line].visible != visible) {
delta += visible ? lines[line].height : -lines[line].height;
lines[line].visible = visible;
+ valid = false;
}
}
}
linesInDisplay += delta;
- valid = false;
return delta != 0;
}