The char* returned is to an allocation owned by the undo history
| 393 | |
| 394 | // The char* returned is to an allocation owned by the undo history |
| 395 | const char *CellBuffer::InsertString(int position, const char *s, int insertLength, bool &startSequence) { |
| 396 | char *data = 0; |
| 397 | // InsertString and DeleteChars are the bottleneck though which all changes occur |
| 398 | if (!readOnly) { |
| 399 | if (collectingUndo) { |
| 400 | // Save into the undo/redo stack, but only the characters - not the formatting |
| 401 | // This takes up about half load time |
| 402 | uh.AppendAction(insertAction, position, s, insertLength, startSequence); |
| 403 | } |
| 404 | |
| 405 | BasicInsertString(position, s, insertLength); |
| 406 | } |
| 407 | return data; |
| 408 | } |
| 409 | |
| 410 | bool CellBuffer::SetStyleAt(int position, char styleValue, char mask) { |
| 411 | styleValue &= mask; |
nothing calls this directly
no test coverage detected