(nearly) fix auto theming for codemirror