diff options
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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--; } |