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

Method ParaUpOrDown

scintilla/src/Editor.cxx:5261–5276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5259}
5260
5261void Editor::ParaUpOrDown ( int direction, Selection::selTypes selt )
5262{
5263 int lineDoc, savedPos = sel.MainCaret();
5264 do {
5265 MovePositionTo ( SelectionPosition ( direction > 0 ? pdoc->ParaDown ( sel.MainCaret() ) : pdoc->ParaUp ( sel.MainCaret() ) ), selt );
5266 lineDoc = pdoc->LineFromPosition ( sel.MainCaret() );
5267 if ( direction > 0 ) {
5268 if ( sel.MainCaret() >= pdoc->Length() && !cs.GetVisible ( lineDoc ) ) {
5269 if ( selt == Selection::noSel ) {
5270 MovePositionTo ( SelectionPosition ( pdoc->LineEndPosition ( savedPos ) ) );
5271 }
5272 break;
5273 }
5274 }
5275 } while ( !cs.GetVisible ( lineDoc ) );
5276}
5277
5278int Editor::StartEndDisplayLine ( int pos, bool start )
5279{

Callers

nothing calls this directly

Calls 8

SelectionPositionClass · 0.85
MainCaretMethod · 0.80
ParaDownMethod · 0.80
ParaUpMethod · 0.80
GetVisibleMethod · 0.80
LineEndPositionMethod · 0.80
LineFromPositionMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected