MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / InsertString

Method InsertString

scintilla/src/CellBuffer.cxx:395–408  ·  view source on GitHub ↗

The char* returned is to an allocation owned by the undo history

Source from the content-addressed store, hash-verified

393
394// The char* returned is to an allocation owned by the undo history
395const 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
410bool CellBuffer::SetStyleAt(int position, char styleValue, char mask) {
411 styleValue &= mask;

Callers

nothing calls this directly

Calls 1

AppendActionMethod · 0.80

Tested by

no test coverage detected