Function yrs::yundo_manager_clear
source · #[no_mangle]
pub unsafe extern "C" fn yundo_manager_clear(mgr: *mut YUndoManager)
Expand description
Removes all the undo/redo stack changes tracked by current undo manager. This also cleans up all the items that couldn’t be deallocated / garbage collected for the sake of possible undo/redo operations.
Keep in mind that this function call requires that underlying document store is not concurrently modified by other read-write transaction. This is done by acquiring the read-only transaction itself. If such transaction could be acquired (because of another read-write transaction is in progress, this function will hold current thread until acquisition is possible.