aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-06-10 11:00:41 +0000
committernyamatongwe <devnull@localhost>2009-06-10 11:00:41 +0000
commit55b811f12b1c87b24e33355caca394138f7caaae (patch)
treeb7789b8354d9ce16809ec2516b687f04d51b2ad6
parent8b064ce4521a34da81beefe5c7b7743825a90b45 (diff)
downloadscintilla-mirror-55b811f12b1c87b24e33355caca394138f7caaae.tar.gz
Stop fold header flag sticking to last empty line.
-rw-r--r--src/PerLine.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx
index 5408c0258..f8989691d 100644
--- a/src/PerLine.cxx
+++ b/src/PerLine.cxx
@@ -251,7 +251,9 @@ void LineLevels::RemoveLine(int line) {
// to line before to avoid a temporary disappearence causing expansion.
int firstHeader = levels[line] & SC_FOLDLEVELHEADERFLAG;
levels.Delete(line);
- if (line > 0)
+ if (line == levels.Length()-1) // Last line loses the header flag
+ levels[line-1] &= ~SC_FOLDLEVELHEADERFLAG;
+ else if (line > 0)
levels[line-1] |= firstHeader;
}
}