Save Modifications

If you have merged areas from one side of the difference listing to the other, pasted or cleared lines (all of them marked with a ‘+’ next to the line number — a line you inserted has no number of its own and shows the ‘+’ alone) then this command allows you to save the modifications into the file(s). The original file is kept as a backup with .BAK appended to its full name (e.g. notes.txt → notes.txt.BAK), so files that differ only in their extension get separate backups.

The backup can be switched off with the “Create .BAK backup when saving” checkbox in the File Comparison Options dialog; the modified file then replaces the original directly. If the backup cannot be created — for example because an existing .BAK file is write-protected — Diffoniq asks whether to save without a backup instead of discarding the modifications.

When both sides have edits, Diffoniq asks for each side in turn. Cancel on either side saves nothing, not even the side you already answered with Yes. If one side is saved and the other cannot be (its error is shown), the comparison is reloaded from disk so that it matches the saved file; the unsaved changes of the other side are discarded then, and a message says so first. The comparison is also reloaded when a command that would have left it after saving stays on it — for example Esc in a comparison of two files, or Next Files without another pair.

A file keeps its encoding when it is saved (see Languages and Character Sets). A file in the ANSI character set of Windows cannot store every character: Japanese text in a Western European file, for example, or an umlaut in a Japanese one. When your changes contain such characters, Diffoniq asks before saving and names the file, its code page, how many characters are affected and the first of them with its line:

Saving changes the content and nothing else about the file: its attributes, its permissions, its creation date and data Windows keeps beside the content (such as the note that a file came from the internet) stay as they were. Where the drive cannot carry them over, for example on a network share that does not support it, the content is saved all the same.

While a side has unsaved edits, an asterisk (*) appears in front of that file’s name in the header bar. It disappears once the edits are saved or undone.