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

Method onDocumentTextChanged

src/eepp/ui/uicodeeditor.cpp:2265–2282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2263}
2264
2265void UICodeEditor::onDocumentTextChanged( const DocumentContentChange& change ) {
2266 invalidateDraw();
2267 mDocView.updateCache( change.range.start().line(), change.range.start().line(), 0 );
2268
2269 if ( !change.text.empty() && !mDocView.isWrapEnabled() ) {
2270 auto range = findLongestLineInRange( change.range );
2271 if ( range.second > mLongestLineWidth ) {
2272 mLongestLineIndex = range.first;
2273 mLongestLineWidth = range.second;
2274 }
2275 } else {
2276 invalidateLongestLineWidth();
2277 }
2278
2279 findRegionsDelayed();
2280 checkMatchingBrackets();
2281 sendCommonEvent( Event::OnTextChanged );
2282}
2283
2284void UICodeEditor::onDocumentCursorChange( const Doc::TextPosition& ) {
2285 resetCursor();

Callers

nothing calls this directly

Calls 4

updateCacheMethod · 0.80
isWrapEnabledMethod · 0.80
startMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected