From 944bf4364d72cef3c55f212628a3414ffcbf961c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 21 Apr 2000 01:59:43 +0000 Subject: Changed font sizing to use more Windows compatible calculation Some unfinished work on fixing folding bugs. --- src/CellBuffer.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/CellBuffer.cxx') 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) { -- cgit v1.2.3