MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / ExpandLine

Method ExpandLine

scintilla/src/Editor.cxx:7098–7115  ·  view source on GitHub ↗

* Recursively expand a fold, making lines visible except where they have an unexpanded parent. */

Source from the content-addressed store, hash-verified

7096 * Recursively expand a fold, making lines visible except where they have an unexpanded parent.
7097 */
7098int Editor::ExpandLine ( int line )
7099{
7100 int lineMaxSubord = pdoc->GetLastChild ( line );
7101 line++;
7102 while ( line <= lineMaxSubord ) {
7103 cs.SetVisible ( line, line, true );
7104 int level = pdoc->GetLevel ( line );
7105 if ( level & SC_FOLDLEVELHEADERFLAG ) {
7106 if ( cs.GetExpanded ( line ) ) {
7107 line = ExpandLine ( line );
7108 } else {
7109 line = pdoc->GetLastChild ( line );
7110 }
7111 }
7112 line++;
7113 }
7114 return lineMaxSubord;
7115}
7116
7117void Editor::SetFoldExpanded ( int lineDoc, bool expanded )
7118{

Callers

nothing calls this directly

Calls 4

GetLastChildMethod · 0.80
SetVisibleMethod · 0.80
GetLevelMethod · 0.45
GetExpandedMethod · 0.45

Tested by

no test coverage detected