| 2263 | } |
| 2264 | |
| 2265 | void 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 | |
| 2284 | void UICodeEditor::onDocumentCursorChange( const Doc::TextPosition& ) { |
| 2285 | resetCursor(); |
nothing calls this directly
no test coverage detected