aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index 9a8d49bb6..9577afbda 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -474,6 +474,10 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle,
lineCurrent++;
levelCurrent = levelNext;
levelMinCurrent = levelCurrent;
+ if (atEOL && (i == static_cast<unsigned int>(styler.Length()-1))) {
+ // There is an empty line at end of file so give it same level and empty
+ styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);
+ }
visibleChars = 0;
}
}