I was ssh'ing into a Raspberry Pi running Raspbian, editing a file with nano, when I lost my internet connection (by leaving the WiFi zone). After reconnecting an hour later, I found that the pi had kicked me out, but after logging back in, I saw that it did not stop the task. When I reopened nano, it told me that the file was being edited by the previous nano process, and it gave me the PID. I made substantial changes to the file and forgot to save, but presumably the changes are still there.
How can I tell nano to save & quit (^O -> Enter -> ^X) or reopen the task in a new shell, from outside the original process?