The popup menus 'accept' function saves changed text back to the file. Usually, there is a keyboard shortcut (such as CMD-a) available for the accept function.
Unless an accept is performed, changes made to the text do not affect the underlying file.
If you change your mind, and want your editing be undone, simple select the file again (double-click). This will bring the original or last accepted contents of the file back into the contents view.
In case you have modified the text in the contents view, you will get a warning (and a chance to change your mind) when you try to change directories, get another files contents or close the fileBrowser window.