diff-preview: extract Esc handler setup to common editor customizer