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

Method getWordRangeInPosition

src/eepp/ui/doc/textdocument.cpp:2603–2610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2601}
2602
2603TextRange 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
2612TextRange TextDocument::getWordRangeInPosition( bool basedOnHighlighter ) {
2613 return getWordRangeInPosition( getSelection().start(), basedOnHighlighter );

Callers 2

onMouseMoveMethod · 0.80
updateMatchMethod · 0.80

Calls 3

getSelectionFunction · 0.85
getTokenPositionAtMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected