in %edit, don't save "last_call" unless last call succeeded

avoids failing calls to `%edit` from killing future `%edit -p`

closes #2466