src/extensions/default/CodeFolding/main.js
function saveLineFolds(editor) {
        var saveFolds = prefs.getSetting("saveFoldStates");
        if (!editor || !saveFolds) {
            return;
        }
        var folds = editor._codeMirror._lineFolds || {};
        var path = editor.document.file.fullPath;
        if (Object.keys(folds).length) {
            prefs.setFolds(path, folds);
        } else {
            prefs.setFolds(path, undefined);
        }
    }
function saveLineFolds(editor) {
        var saveFolds = prefs.getSetting("saveFoldStates");
        if (!editor || !saveFolds) {
            return;
        }
        var folds = editor._codeMirror._lineFolds || {};
        var path = editor.document.file.fullPath;
        if (Object.keys(folds).length) {
            prefs.setFolds(path, folds);
        } else {
            prefs.setFolds(path, undefined);
        }
    }
function saveLineFolds ( editor ) { var saveFolds = prefs . getSetting ( "saveFoldStates" ) ; if ( ! editor || ! saveFolds ) { return ; } var folds = editor . _codeMirror . _lineFolds || { } ; var path = editor . document . file . fullPath ; if ( Object . keys ( folds ) . length ) { prefs . setFolds ( path , folds ) ; } else { prefs . setFolds ( path , undefined ) ; } }
Saves the line folds in the editor using the preference storage
@param {Editor} editor the editor whose line folds should be saved
Saves the line folds in the editor using the preference storage