editor: save and reset terminal after calling EDITOR