| 2601 | } |
| 2602 | |
| 2603 | TextRange TextDocument::getWordRangeInPosition( const TextPosition& pos, bool basedOnHighlighter ) { |
| 2604 | if ( mHighlighter && basedOnHighlighter ) { |
| 2605 | auto type( mHighlighter->getTokenPositionAt( pos ) ); |
| 2606 | return { { pos.line(), type.pos }, { pos.line(), type.pos + (Int64)type.len } }; |
| 2607 | } |
| 2608 | |
| 2609 | return { nextWordBoundary( pos, false ), previousWordBoundary( pos, false ) }; |
| 2610 | } |
| 2611 | |
| 2612 | TextRange TextDocument::getWordRangeInPosition( bool basedOnHighlighter ) { |
| 2613 | return getWordRangeInPosition( getSelection().start(), basedOnHighlighter ); |
no test coverage detected