aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-02-06 13:24:32 +0000
committernyamatongwe <unknown>2005-02-06 13:24:32 +0000
commitf335ecfdba64a61b11aa1d88cd21f433ad6f5a82 (patch)
tree730d8f267b87af7fabbd6a9f29f7f6175df25168
parentdbba5f5ab521c75ea89599efb4b0b8564996a0b5 (diff)
downloadscintilla-mirror-f335ecfdba64a61b11aa1d88cd21f433ad6f5a82.tar.gz
A potential fix for bug reported to Scintilla mailing list "folding + undo = problem". It changes the the deletion of lines of fold information to remove the line being deleted rather than the previous line. The deletion of the previous line looks like an attempt to avoid losing folding information when a line is deleted.
-rw-r--r--src/CellBuffer.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 8183e4d8d..772f48e6e 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -254,11 +254,7 @@ void LineVector::Remove(int pos) {
linesData[i] = linesData[i + 1];
}
if (levels) {
- // Level information merges back onto previous line
- int posAbove = pos - 1;
- if (posAbove < 0)
- posAbove = 0;
- for (int j = posAbove; j < lines; j++) {
+ for (int j = pos; j < lines; j++) {
levels[j] = levels[j + 1];
}
}