function extractCursorPos(query) {
        var regInfo = query.match(CURSOR_POS_EXP);

        if (query.length <= 1 || !regInfo ||
                (regInfo[1] && isNaN(regInfo[1])) ||
                (regInfo[3] && isNaN(regInfo[3]))) {

            return null;
        }

        return {
            query:  regInfo[0],
            local:  query[0] === ":",
            line:   regInfo[1] - 1 || 0,
            ch:     regInfo[3] - 1 || 0
        };
    }
function extractCursorPos(query) {
        var regInfo = query.match(CURSOR_POS_EXP);

        if (query.length <= 1 || !regInfo ||
                (regInfo[1] && isNaN(regInfo[1])) ||
                (regInfo[3] && isNaN(regInfo[3]))) {

            return null;
        }

        return {
            query:  regInfo[0],
            local:  query[0] === ":",
            line:   regInfo[1] - 1 || 0,
            ch:     regInfo[3] - 1 || 0
        };
    }
function extractCursorPos ( query ) { var regInfo = query . match ( CURSOR_POS_EXP ) ; if ( query . length <= 1 || ! regInfo || ( regInfo [ 1 ] && isNaN ( regInfo [ 1 ] ) ) || ( regInfo [ 3 ] && isNaN ( regInfo [ 3 ] ) ) ) { return null ; } return { query : regInfo [ 0 ] , local : query [ 0 ] === ":" , line : regInfo [ 1 ] - 1 || 0 , ch : regInfo [ 3 ] - 1 || 0 } ; }
Attempts to extract a line number from the query where the line number
is followed by a colon. Callers should explicitly test result with isNaN()

@param {string} query string to extract line number from
@return {{query: string, local: boolean, line: number, ch: number}} An object with
the extracted line and column numbers, and two additional fields: query with the original position
string and local indicating if the cursor position should be applied to the current file.
Or null if the query is invalid
Attempts to extract a line number from the query where the line number is followed by a colon . Callers should explicitly test result with isNaN ()
Extract cursor pos from query