> > | > | + ParIterator const end = b->par_iterator_end(); > | > | + for (; it != end; ++it) > | > | + if (it.pit() == pit) { > | > | + > bv_->setCursor(makeDocIterator(it, pos)); > | > | + bv_->update(Update::FitCursor); > | > | + break; > | > | + } > | > | + } > | > | + } > It should still be refactored. > > If not for anything else that the code gets easier to read. > (I do not quite see how removal of id plays into this.) > (And no; operator[pit] on paragraphs won't solve it, just make the > cursor placement even more coarse grained)
You are talking about removing paragraph id, then restorePosition() will use filename, pit (currently id) and pos, and then this part can make use of it. Right now, if I separate the code, it would be another version of restorePosition() that uses pit. Bo