From 88118352c3a106ef9425f47776cb6549494cc63e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 16 Jun 2005 12:49:11 +0000 Subject: Fixes to folding in Scintilla and SciTE as described in Bug #1219354. --- src/CellBuffer.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 2bb4f5a6c..8200d4a59 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -254,9 +254,14 @@ void LineVector::Remove(int pos) { linesData[i] = linesData[i + 1]; } if (levels) { + // Move up following lines but merge header flag from this line + // to line before to avoid a temporary disappearence causing expansion. + int firstHeader = levels[pos] & SC_FOLDLEVELHEADERFLAG; for (int j = pos; j < lines; j++) { levels[j] = levels[j + 1]; } + if (pos > 0) + levels[pos-1] |= firstHeader; } lines--; } -- cgit v1.2.3