Saving and changes on disk
Ctrl S saves the file shown. ted never loses a change without asking.
Saving
- The file is written to a temporary file next to it and then renamed over it, so a crash or a full disk never leaves half a file.
- Saving removes the spaces and tabs at the end of every line and ends the file with a line break, as one step that undo can revert. Both can be turned off in Settings.
- A file with unsaved changes shows a dot in its tab, in place of the cross, and before its name in the window title. Undoing back to the saved text makes it clean again.
Unsaved changes
Closing a tab, closing the window, or opening another folder with unsaved changes asks Save the changes to name?, with Don't save, Cancel and Save, once per file. Cancel stops there and nothing closes.
Changes made by other programs
When the ted window gets the focus back, it checks the file shown. If another program changed it:
- without unsaved changes in ted, it reloads at once;
- with unsaved changes, ted asks: Keep my changes or Reload.
Saving over a file that another program changed after ted read it asks first: Cancel or Overwrite.