aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-02-06 13:24:32 +0000
committernyamatongwe <devnull@localhost>2005-02-06 13:24:32 +0000
commitd9674b7f659b90b8a97ea96e7abb1f82cea3b0b3 (patch)
tree730d8f267b87af7fabbd6a9f29f7f6175df25168
parent896b66a11d723ad75722581396fef196249ef25d (diff)
downloadscintilla-mirror-d9674b7f659b90b8a97ea96e7abb1f82cea3b0b3.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];
}
}