def getLinesTillEnd(act):
    """ determine how many lines from current position to the end of the file """
    cursor = act.pos.getIter(act)
    line = cursor.get_line()
    total = act.vibase.doc.get_line_count()
    act.trace.info(2, "lines till end of document : ", total-line)
    return total-line