Text_Buffer module

seal_undo

procedureextensionexperimentalsince 0.31.0Source

Stops the next typed character from merging into the previous undo step. Call it when the cursor moves, so undo steps follow what the user did.

Example↗
buffer: Text_Buffer;
defer free_buffer(*buffer);
insert(*buffer, 0, "a");
insert(*buffer, 1, "b");
seal_undo(*buffer);
insert(*buffer, 2, "c");
undo(*buffer);
assert(buffer_to_string(*buffer, temp) == "ab");
seal_undo :: (buffer: *Text_Buffer)

Parameters

buffer: *Text_Buffer

See also