src/extensions/default/CodeFolding/foldhelpers/foldgutter.js
function updateInViewport(cm, from, to) {
        var vp = cm.getViewport(), state = cm.state.foldGutter;
        from = isNaN(from) ? vp.from : from;
        to = isNaN(to) ? vp.to : to;

        if (!state) { return; }
        cm.operation(function () {
            updateFoldInfo(cm, from, to);
        });
        state.from = from;
        state.to = to;
    }
function updateInViewport(cm, from, to) {
        var vp = cm.getViewport(), state = cm.state.foldGutter;
        from = isNaN(from) ? vp.from : from;
        to = isNaN(to) ? vp.to : to;

        if (!state) { return; }
        cm.operation(function () {
            updateFoldInfo(cm, from, to);
        });
        state.from = from;
        state.to = to;
    }
function updateInViewport ( cm , from , to ) { var vp = cm . getViewport ( ) , state = cm . state . foldGutter ; from = isNaN ( from ) ? vp . from : from ; to = isNaN ( to ) ? vp . to : to ; if ( ! state ) { return ; } cm . operation ( function ( ) { updateFoldInfo ( cm , from , to ) ; } ) ; state . from = from ; state . to = to ; }
Updates the fold information in the viewport for the specified range
@param {CodeMirror} cm the instance of the CodeMirror object
@param {?number} from the starting line number for the update
@param {?number} to the end line number for the update
Updates the fold information in the viewport for the specified range