From 82b5df1e6a44a6e814ce9ad207ab5e106dd9de1d Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 15 Aug 2016 15:42:52 +1000 Subject: Bug [#1842]. Fix fold expand when some child text not styled. --- src/Editor.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 -- cgit v1.2.3