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

Method addSelections

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

Source from the content-addressed store, hash-verified

1262}
1263
1264TextRange TextDocument::addSelections( TextRanges&& selections ) {
1265 mSelection.reserve( mSelection.size() + selections.size() );
1266 for ( auto& selection : selections )
1267 mSelection.push_back( sanitizeRange( selection ) );
1268 mSelection.sort();
1269 mergeSelection();
1270 notifyCursorChanged( selections.back().start() );
1271 notifySelectionChanged( selections.back() );
1272 mLastSelection = mSelection.findIndex( selections.back() );
1273 return selections.back();
1274}
1275
1276TextRange TextDocument::addSelection( TextRange selection ) {
1277 if ( mSelection.exists( selection ) )

Calls 6

reserveMethod · 0.80
push_backMethod · 0.80
findIndexMethod · 0.80
sizeMethod · 0.45
sortMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected