'Go to next todo and return new cursor position'

def go_to_next_todo(self):

    block = self.textCursor().block()
    line_count = self.document().blockCount()
    while True:
        if ((block.blockNumber() + 1) < line_count):
            block = block.next()
        else:
            block = self.document().firstBlock()
        data = block.userData()
        if (data and data.todo):
            break
    line_number = (block.blockNumber() + 1)
    self.go_to_line(line_number)
    self.show_calltip(_('To    do'), data.todo, color='#3096FC', at_line=line_number)
    return self.get_position('cursor')
