> home > Custom Layer Boundary API

buffer_history_merge_record_range

September 8th 2024
Merge a range of records into a single group record

Signature

C++
b32
buffer_history_merge_record_range(Application_Links* app,
                                  Buffer_ID buffer_id,
                                  History_Record_Index first_index,
                                  History_Record_Index last_index,
                                  Record_Merge_Flag flags);

Parameters

app

the standard custom layer context pointer

buffer_id

the id of the buffer to modify

first_index

the first index in the range to merge

last_index

the last index in the range to merge, forming an inclusive-inclusive range

flags

flags controlling the behavior of the operation

Return

non-zero on success, when the buffer exists, and the index range is contained within the buffer history, otherwise zero

Details

Group records contain all the same information that the range of individual records previously contained. A group is treated as a single unit in undo-redo operations.