Undo and redo
Each open document has its own editing history.
Undo or redo edits
Choose Edit → Undo (⌘Z) or Edit → Redo (⇧⌘Z). This works for cell edits, inserting and deleting rows, replacements, sorting and restoring the original order. Replace All is undone as one operation.
Making a new edit discards previously undone steps from the redo history. A command is disabled when no step is available. Undo and redo clear the row selection. They also update the contents that will be written on the next save.
Manual row moves can also be undone and redone.
In documents that have not been saved yet, this also covers adding, deleting and moving columns.
What is outside the editing history
Checking rows and using Find and Select change only the selection and do not create an editing step. Toggling the header row also leaves CSV data unchanged.
History is not stored in the CSV file and starts fresh after reopening. Reloading the document with different file contents resets history and highlighting. Character encoding correction creates a separate document and does not add an edit to the original.
For saved files, column changes create a copy. They do not change the original or add an undo step to it. Close the copy if you do not want to keep the change. Until a new document or copy has been saved, further column changes are applied directly and are included in its undo history.