notify of dirty state to editor straight away, while keeping the ESC
behavior. Fixes #169, hopefully.