Update inner mode detection for codemirror v3

This replaces https://github.com/adobe/brackets/pull/2946