buffer_batch_edit
September 8th 2024
Replace a sorted sequence of ranges with specific strings
Signature
b32
buffer_batch_edit(Application_Links* app,
Buffer_ID buffer_id,
Batch_Edit* batch);
Parameters
app
the standard custom layer context pointer
buffer_id
the id of the buffer to modify
batch
the first batch edit in a linked list of edits to apply in one atomic modification
Return
non-zero on success, when the buffer exists and the batch is correctly sorted and contained within the buffer, zero otherwise
Details
The ranges of the batch edit should all refer to the range they would have edited in the original state of the buffer. Put another way, the user should make no assumption about what order the individual edist are applied, and instead should treat the operation as applying all replacements atomically.
All modifications made by this call are saved into the history as a single edit record, thus undoing this edit reversed the entire batch.
Related