+2

Trimming white spaces can make lose undo history

Santiago Borrazás 8 years ago • updated by Igor Verstakov 6 years ago 1
When "ensure_newline_at_eof_on_save", "trim_trailing_white_space_on_save" or "trim_automatic_white_space" are enabled, I can loss my undo history when the editor removes the white spaces after saving.
This occurs on most text editors, because if you do something, undo and save, the save remove empty spaces, so when you want to redo what you did, the last action is that space removing, instead what you really do (not the editor)

Yeah, in TextMate this is fixed by making editor remove the spaces from the saved file and not the editor window. You will still see the trailing spaces but the file will be clean and the undo history untouched.