MCPcopy Create free account
hub / github.com/SpartanJ/eepp / jumpLinesUp

Method jumpLinesUp

src/eepp/ui/uicodeeditor.cpp:3627–3637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3625}
3626
3627void UICodeEditor::jumpLinesUp( int offset ) {
3628 for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) {
3629 TextPosition position = mDoc->getSelections()[i].start();
3630 if ( mDocView.getVisibleLineRange( position ).visibleIndex == VisibleIndex::first ) {
3631 mDoc->setSelection( i, mDoc->startOfDoc(), mDoc->startOfDoc() );
3632 } else {
3633 mDoc->moveTo( i, moveToLineOffset( position, offset, i ) );
3634 }
3635 }
3636 mDoc->mergeSelection();
3637}
3638
3639void UICodeEditor::jumpLinesDown( int offset ) {
3640 for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) {

Callers 1

createCodeEditorMethod · 0.80

Calls 7

startOfDocMethod · 0.80
moveToMethod · 0.80
mergeSelectionMethod · 0.80
sizeMethod · 0.45
startMethod · 0.45
getVisibleLineRangeMethod · 0.45
setSelectionMethod · 0.45

Tested by

no test coverage detected