| 3609 | } |
| 3610 | |
| 3611 | void 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 | |
| 3627 | void UICodeEditor::jumpLinesUp( int offset ) { |
| 3628 | for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) { |
no test coverage detected