| 7294 | } |
| 7295 | |
| 7296 | void Editor::FoldChanged ( int line, int levelNow, int levelPrev ) |
| 7297 | { |
| 7298 | if ( levelNow & SC_FOLDLEVELHEADERFLAG ) { |
| 7299 | if ( ! ( levelPrev & SC_FOLDLEVELHEADERFLAG ) ) { |
| 7300 | // Adding a fold point. |
| 7301 | if ( cs.SetExpanded ( line, true ) ) { |
| 7302 | RedrawSelMargin(); |
| 7303 | } |
| 7304 | FoldExpand ( line, SC_FOLDACTION_EXPAND, levelPrev ); |
| 7305 | } |
| 7306 | } else if ( levelPrev & SC_FOLDLEVELHEADERFLAG ) { |
| 7307 | if ( !cs.GetExpanded ( line ) ) { |
| 7308 | // Removing the fold from one that has been contracted so should expand |
| 7309 | // otherwise lines are left invisible with no way to make them visible |
| 7310 | if ( cs.SetExpanded ( line, true ) ) { |
| 7311 | RedrawSelMargin(); |
| 7312 | } |
| 7313 | FoldExpand ( line, SC_FOLDACTION_EXPAND, levelPrev ); |
| 7314 | } |
| 7315 | } |
| 7316 | if ( ! ( levelNow & SC_FOLDLEVELWHITEFLAG ) && |
| 7317 | ( ( levelPrev & SC_FOLDLEVELNUMBERMASK ) > ( levelNow & SC_FOLDLEVELNUMBERMASK ) ) ) { |
| 7318 | if ( cs.HiddenLines() ) { |
| 7319 | // See if should still be hidden |
| 7320 | int parentLine = pdoc->GetFoldParent ( line ); |
| 7321 | if ( ( parentLine < 0 ) || ( cs.GetExpanded ( parentLine ) && cs.GetVisible ( parentLine ) ) ) { |
| 7322 | cs.SetVisible ( line, line, true ); |
| 7323 | SetScrollBars(); |
| 7324 | Redraw(); |
| 7325 | } |
| 7326 | } |
| 7327 | } |
| 7328 | } |
| 7329 | |
| 7330 | void Editor::NeedShown ( int pos, int len ) |
| 7331 | { |
nothing calls this directly
no test coverage detected