Ensure open editor reflects saved file.

When using something like remove trailing whitespace, we can end up with
a final document being saved to disk that is different from the open
editor. This patch attempts to ensure we always reflect the editor to
reflect what was actually saved once save is over.