diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index d9bc37694..b480287c3 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5292,7 +5292,7 @@ void Editor::FoldExpand(int line, int action, int level) { if (expanding && (cs.HiddenLines() == 0)) // Nothing to do return; - int lineMaxSubord = pdoc->GetLastChild(line, level & SC_FOLDLEVELNUMBERMASK); + int lineMaxSubord = pdoc->GetLastChild(line, LevelNumber(level)); line++; cs.SetVisible(line, lineMaxSubord, expanding); while (line <= lineMaxSubord) { @@ -5399,7 +5399,7 @@ void Editor::FoldAll(int action) { for (int line = 0; line < maxLine; line++) { int level = pdoc->GetLevel(line); if ((level & SC_FOLDLEVELHEADERFLAG) && - (SC_FOLDLEVELBASE == (level & SC_FOLDLEVELNUMBERMASK))) { + (SC_FOLDLEVELBASE == LevelNumber(level))) { SetFoldExpanded(line, false); int lineMaxSubord = pdoc->GetLastChild(line, -1); if (lineMaxSubord > line) { @@ -5440,7 +5440,7 @@ void Editor::FoldChanged(int line, int levelNow, int levelPrev) { } } if (!(levelNow & SC_FOLDLEVELWHITEFLAG) && - ((levelPrev & SC_FOLDLEVELNUMBERMASK) > (levelNow & SC_FOLDLEVELNUMBERMASK))) { + (LevelNumber(levelPrev) > LevelNumber(levelNow))) { if (cs.HiddenLines()) { // See if should still be hidden int parentLine = pdoc->GetFoldParent(line); |