def METHOD_NAME(self, select=False):
    """Jump to the matching token, selecting the text if select is True."""
    cursor = self.view().textCursor()
    cursors = matches(cursor)
    if len(cursors) < 2:
        return
    if select:
        if cursors[0] < cursors[1]:
            anchor, pos = cursors[0].selectionStart(), cursors[1].selectionEnd()
        else:
            anchor, pos = cursors[0].selectionEnd(), cursors[1].selectionStart()
        cursor.setPosition(anchor)
        cursor.setPosition(pos, cursor.KeepAnchor)
    else:
        cursor.setPosition(cursors[1].selectionStart())
    self.view().setTextCursor(cursor)