function rangeEqualsSelection(range, selection) {
            return range.from.line === selection.start.line && range.from.ch === selection.start.ch &&
                range.to.line === selection.end.line && range.to.ch === selection.end.ch;
        }
Checks if the range from and to Pos is the same as the selection start and end Pos
@param   {Object}  range     {from, to} where from and to are CodeMirror.Pos objects
@param   {Object}  selection {start, end} where start and end are CodeMirror.Pos objects
@returns {Boolean} true if the range and selection span the same region and false otherwise