Require confirmation before abandoning edits

Fixes #544