From f335ecfdba64a61b11aa1d88cd21f433ad6f5a82 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 6 Feb 2005 13:24:32 +0000 Subject: 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. --- src/CellBuffer.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') 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]; } } -- cgit v1.2.3