| 1642 | } |
| 1643 | |
| 1644 | void UICodeEditor::addCursorsFromCurrentToMousePosition() { |
| 1645 | auto position = getInput()->getMousePos(); |
| 1646 | auto textScreenPos( resolveScreenPosition( position.asFloat() ) ); |
| 1647 | TextRange range( mDoc->getSelection().start(), textScreenPos ); |
| 1648 | range = mDoc->sanitizeRange( range ); |
| 1649 | TextRange nrange = range.normalized(); |
| 1650 | TextRanges ranges; |
| 1651 | ranges.reserve( nrange.end().line() - nrange.start().line() + 1 ); |
| 1652 | for ( Int64 i = nrange.start().line(); i <= nrange.end().line(); ++i ) { |
| 1653 | TextPosition pos{ i, range.start().column() }; |
| 1654 | ranges.push_back( TextRange{ pos, pos } ); |
| 1655 | } |
| 1656 | mDoc->addSelections( std::move( ranges ) ); |
| 1657 | } |
| 1658 | |
| 1659 | bool UICodeEditor::fold( Int64 docLineIdx ) { |
| 1660 | if ( mDoc->getFoldRangeService().isFoldingRegionInLine( docLineIdx ) ) { |
no test coverage detected