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. --- doc/ScintillaHistory.html | 5 +++++ src/Editor.cxx | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index b14d2980c..e8d806040 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -521,6 +521,11 @@ Bug #1849.
  • + Fix fold expand when some child text not styled. + Caused by fixes for Bug #1799. + Bug #1842. +
  • +
  • Fix scroll bar size warnings on GTK+ caused by #1831. Bug #1851.
  • 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