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

Method selectToStartOfContent

src/eepp/ui/uicodeeditor.cpp:3611–3625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3609}
3610
3611void UICodeEditor::selectToStartOfContent() {
3612 for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) {
3613 TextPosition start = mDoc->getSelectionIndex( i ).start();
3614 auto info = mDocView.getVisibleLineRange( start );
3615 if ( info.range.start().column() != 0 ) {
3616 mDoc->selectTo( i, info.range.start() != start ? info.range.start()
3617 : mDoc->startOfContent( start ) );
3618 } else {
3619 TextPosition indented = mDoc->startOfContent( mDoc->getSelectionIndex( i ).start() );
3620 mDoc->selectTo( i, indented.column() == start.column() ? TextPosition( start.line(), 0 )
3621 : indented );
3622 }
3623 }
3624 mDoc->mergeSelection();
3625}
3626
3627void UICodeEditor::jumpLinesUp( int offset ) {
3628 for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) {

Callers 1

registerCommandsMethod · 0.45

Calls 9

TextPositionFunction · 0.85
getSelectionIndexMethod · 0.80
columnMethod · 0.80
selectToMethod · 0.80
startOfContentMethod · 0.80
mergeSelectionMethod · 0.80
sizeMethod · 0.45
startMethod · 0.45
getVisibleLineRangeMethod · 0.45

Tested by

no test coverage detected