| 3570 | } |
| 3571 | |
| 3572 | void UICodeEditor::moveToStartOfContent() { |
| 3573 | for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) { |
| 3574 | TextPosition start = mDoc->getSelectionIndex( i ).start(); |
| 3575 | auto info = mDocView.getVisibleLineRange( start ); |
| 3576 | if ( info.range.start().column() != 0 ) { |
| 3577 | mDoc->setSelection( i, info.range.start() != start ? info.range.start() |
| 3578 | : mDoc->startOfContent( start ) ); |
| 3579 | } else { |
| 3580 | TextPosition indented = mDoc->startOfContent( mDoc->getSelectionIndex( i ).start() ); |
| 3581 | mDoc->setSelection( i, indented.column() == start.column() |
| 3582 | ? TextPosition( start.line(), 0 ) |
| 3583 | : indented ); |
| 3584 | } |
| 3585 | } |
| 3586 | mDoc->mergeSelection(); |
| 3587 | } |
| 3588 | |
| 3589 | void UICodeEditor::selectToStartOfLine() { |
| 3590 | for ( size_t i = 0; i < mDoc->getSelections().size(); ++i ) { |
no test coverage detected