Enter mode used in filter#applyTo defaults to editor.enterMode instead of active enter mode.