diff options
author | nyamatongwe <devnull@localhost> | 2009-06-10 11:06:42 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-06-10 11:06:42 +0000 |
commit | f2e13eed5cd366a40e60454f569fc2938f8205f7 (patch) | |
tree | e631fbb31456d5ef25d204cf0ee2fff0f4fca0cb /src | |
parent | 55b811f12b1c87b24e33355caca394138f7caaae (diff) | |
download | scintilla-mirror-f2e13eed5cd366a40e60454f569fc2938f8205f7.tar.gz |
Ensure final empty line in a file has its fold level updated to avoid unexpected
sticky states.
Diffstat (limited to 'src')
-rw-r--r-- | src/LexCPP.cxx | 4 |
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; } } |