src/view/ThemeView.js
function updateThemes(cm) {
        var newTheme = prefs.get("theme"),
            cmTheme  = (cm.getOption("theme") || "").replace(/[\s]*/, ""); // Normalize themes string

        // Check if the editor already has the theme applied...
        if (cmTheme === newTheme) {
            return;
        }

        // Setup current and further documents to get the new theme...
        CodeMirror.defaults.theme = newTheme;
        cm.setOption("theme", newTheme);
    }
function updateThemes(cm) {
        var newTheme = prefs.get("theme"),
            cmTheme  = (cm.getOption("theme") || "").replace(/[\s]*/, ""); // Normalize themes string

        // Check if the editor already has the theme applied...
        if (cmTheme === newTheme) {
            return;
        }

        // Setup current and further documents to get the new theme...
        CodeMirror.defaults.theme = newTheme;
        cm.setOption("theme", newTheme);
    }
function updateThemes ( cm ) { var newTheme = prefs . get ( "theme" ) , cmTheme = ( cm . getOption ( "theme" ) || "" ) . replace ( / [\s]* / , "" ) ; // Normalize themes string // Check if the editor already has the theme applied... if ( cmTheme === newTheme ) { return ; } // Setup current and further documents to get the new theme... CodeMirror . defaults . theme = newTheme ; cm . setOption ( "theme" , newTheme ) ; }
Handles updating codemirror with the current selection of themes.

@param {CodeMirror} cm is the CodeMirror instance currently loaded
Handles updating codemirror with the current selection of themes .