| 7361 | } |
| 7362 | |
| 7363 | int Editor::ReplaceTarget ( bool replacePatterns, const char *text, int length ) |
| 7364 | { |
| 7365 | UndoGroup ug ( pdoc ); |
| 7366 | if ( length == -1 ) { |
| 7367 | length = istrlen ( text ); |
| 7368 | } |
| 7369 | if ( replacePatterns ) { |
| 7370 | text = pdoc->SubstituteByPosition ( text, &length ); |
| 7371 | if ( !text ) { |
| 7372 | return 0; |
| 7373 | } |
| 7374 | } |
| 7375 | if ( targetStart != targetEnd ) { |
| 7376 | pdoc->DeleteChars ( targetStart, targetEnd - targetStart ); |
| 7377 | } |
| 7378 | targetEnd = targetStart; |
| 7379 | pdoc->InsertString ( targetStart, text, length ); |
| 7380 | targetEnd = targetStart + length; |
| 7381 | return length; |
| 7382 | } |
| 7383 | |
| 7384 | bool Editor::IsUnicodeMode() const |
| 7385 | { |
nothing calls this directly
no test coverage detected