Whenever a file is open in DiffPlug, the file status dialog will be available. It can be opened by clicking the button on the toolbar or via its keyboard shortcut [Ctrl Shift S].
The file status dialog shows a list containing each file in the tab, and its current status. Most of the time, this will just be “No external change”. At the far right, you have the option to Save as .
However, if you have made unsaved changes to the file, the file status dialog will show you these changes. At the far right, you have the option to
- Save as to save your changed file to a new location.
- Save over disk to overwrite the disk’s contents with your changes.
- Revert from disk to overwrite your changes with the contents of the disk.
This can be very useful for quickly checking what you’ve done since you last saved. But the file status dialog is especially helpful when you have multiple files open, some of which might be changing externally. In this example, we’ve got two files open in the Simulink differ.
As we review the changes, we notice a mistake in our working version (v2, in this case). We open MATLAB, make some changes, simulate them to confirm, and then save the document in MATLAB. When we return to DiffPlug, it is currently displaying a stale diff - one of the files has changed since the diff was conducted! DiffPlug will automatically detect this change and open the file status dialog for us.
This time the dialog is showing us the difference between the version we opened a few minutes ago, and the version that MATLAB just saved to disk. Before we can close the file status dialog, we’ll have to resolve the conflict, with one of the Save as, Save over disk, or Revert from disk options. Because this change happened outside of DiffPlug, we have to choose one of these options (or close the tab entirely) before we can continue.