def find_thread_end(buf, (row, col)):
    if LineProperties(buf[row - 1]).is_diffscuss:
        for offset, line in enumerate(buf[row:]):
            if not LineProperties(line).is_diffscuss:
                break
        return row + offset, col
    return row, col
If the cursor is in a diffscuss comment, returns the row of the end of the
dataset/ETHPy150Open hut8labs/diffscuss/diffscuss/support/editor.py/find_thread_end