In case you use the external text editor which does not allow multiple instance (or you do not wish to have it configured like this) then you're in trouble (you simply cannot save the other file except the firstly opened one). Can you modify the program to work also with MDI-style (single instance) editors?
If it were that easy I would have done it already :-(
The "problem" is Martin wants to avoid to have your temp-dir populated with lots of rubish. Therefore these temp-files lie around just as long the editor process started by WinSCP is still running.
So my suggestion (another sassy comment ;-) ) would be to monitor the temporary folder which have been created before starting the editor. If the folder itself or the contained files are locked by another process the user is still editing the files.
Admittedly this would be quite a huge effort for the little effect, but as many people out here I also really hate 10 editor windows cluttering my desktop...
I use Editpad Pro, and I've had the issue where I open a couple of files and after I edit them and try to upload them again, it tells me that it can't save to that directory. I have to end up saving them to my desktop and uploading them that way.
I got around this by using the Sync tool. I setup a local directory and a remote directory. Edit the file locally, and ta da... it syncs with the remote directory. It will copy/move any file you put in that specific local directory. I think that this is a better way than trying to right-click and edit. You can have a backup on your local machine if you want it, or it can delete the source file after it's been updated.
Martin... Awesome program bro. You're a freaking genius... You've made my life easier and more secure.