On Wed, Jun 25, 2003 at 10:57:50AM +0200, Alfredo Braunstein wrote: > Dunno, do you think it is feasible to replace all uses of cursor.row by > calls to cursor.row(LyXText &) or something? Alternatively, something like > getRow(cursor, LyXText &)
Rather LyXText::getCursorRow() for starters. This would at least make the cursor ignorant of rows, but I don't know whether this will go through... > > Long term goal is of course to completely separate the cursor from the > > text be using 'deep iterators' (i.e. something pretty much like > > ParIterator right now, but with an additional field to indicate the > > position in the paragraph...) > > Aren't these different issues? Not much different. > As I see it, this last one is how to identify the paragraph/position in > which the cursor is (buffer related). ... and if there were a simple way from par/pos to row/pos, we'd be done... > The problem of invalidation of cursors on rebreaking is /if/how to/ > keep the information in which row it is. Of course, the two will become > more related if in the future each paragraph store its own RowList. Is > this what you are referring to? My current problem is that I don't see a clear path through the forest, so I am somewhat jumping from one approcah to the other. In any case things are too tightly couple there, so _any_ separation should be a step forward. Making the cursor ignorant of rows would be one such step, a per-paragraph row cache might be another one. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
