File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,6 +527,10 @@ export class UndoRedo {
527527 this . batchUndoEntry = undefined
528528 }
529529
530+ /**
531+ * Stores a formula AST hash snapshot for the given LazilyTransformingAstService version.
532+ * Skipped when `undoLimit` is 0 (undo disabled) to avoid storing data that would never be used.
533+ */
530534 public storeDataForVersion ( version : number , address : SimpleCellAddress , astHash : string ) {
531535 if ( this . undoLimit === 0 ) {
532536 return
@@ -538,11 +542,13 @@ export class UndoRedo {
538542 currentOldData . push ( [ address , astHash ] )
539543 }
540544
545+ /** Clears the redo stack and removes oldData entries no longer referenced by any remaining entry. */
541546 public clearRedoStack ( ) {
542547 this . cleanupOldDataForEntries ( this . redoStack , this . undoStack )
543548 this . redoStack = [ ]
544549 }
545550
551+ /** Clears the undo stack and removes oldData entries no longer referenced by any remaining entry. */
546552 public clearUndoStack ( ) {
547553 this . cleanupOldDataForEntries ( this . undoStack , this . redoStack )
548554 this . undoStack = [ ]
You can’t perform that action at this time.
0 commit comments