improved line todo line selection