aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 125399622..3fbf4b341 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5293,6 +5293,9 @@ void Editor::FoldExpand(int line, int action, int level) {
if (action == SC_FOLDACTION_TOGGLE) {
expanding = !cs.GetExpanded(line);
}
+ // Ensure child lines lexed and fold information extracted before
+ // flipping the state.
+ pdoc->GetLastChild(line, LevelNumber(level));
SetFoldExpanded(line, expanding);
if (expanding && (cs.HiddenLines() == 0))
// Nothing to do