aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-04-21 01:59:43 +0000
committernyamatongwe <unknown>2000-04-21 01:59:43 +0000
commit944bf4364d72cef3c55f212628a3414ffcbf961c (patch)
tree473a1082dbd214e4a3d4bb7d0b13d2aa111ee029 /src/CellBuffer.cxx
parentb43ecf7a0ea83d9eac008cc88a3362041ad29055 (diff)
downloadscintilla-mirror-944bf4364d72cef3c55f212628a3414ffcbf961c.tar.gz
Changed font sizing to use more Windows compatible calculation
Some unfinished work on fixing folding bugs.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 9576e917d..0f33d48c4 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -191,11 +191,20 @@ void LineVector::InsertValue(int pos, int value) {
}
}
lines++;
- for (int i = lines + 1; i > pos; i--) {
+ for (int i = lines; i > pos; i--) {
linesData[i] = linesData[i - 1];
}
linesData[pos].startPosition = value;
linesData[pos].handleSet = 0;
+ if (levels) {
+ for (int j = lines; j > pos; j--) {
+ levels[j] = levels[j - 1];
+ }
+ if (pos == (lines-1)) // Last line will not be a folder
+ levels[pos] = SC_FOLDLEVELBASE;
+ else
+ levels[pos] = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;
+ }
}
void LineVector::SetValue(int pos, int value) {