On 21 Sep 2001, Jean-Marc Lasgouttes wrote:

> I have two solutions in mind:
> 
> 1/ the easier and not really correct one: why do we delete/recreate
> rows when a double space has been suppressed? Aren't we guarranteed
> that the paragraph rebreak is not really needed and that rows can be
> modified 'in place'? In this case, of course, the x values of cursor
> may become (slightly?) wrong.
> 
> 2/ the more complete solution: each cursor registers itself in its
> constructor (and unregisters in its destructors). The LyXCursor class
> holds a static vector of bufferview/cursors pairs and, everytime a row
> is deleted/modified, the relevant cursors are updated/invalidated (I
> hope it will be possible to avoid the invalidate part). However, I do
> not see how this could be done for 1.2.0...

Hmmm, why are there so many different cursors. I can only think of
two: Current position and start position of current selection. But maybe
cursor means something different in the code...

Anyway, I always prefer clean solutions (i.e. 2). If 1.2.0 is stopped from
being released because of the cursor problem then it has to be fixed even
if it takes another few days. I assume the code changes would not be too
drastic: Just a small modification in the constructor and destruction and
maybe one or two auxiliary methods. I guess less than 30-50 LOC. Do feel
able to implement solution 2? If yes, I offers myself as a submissive beta
tester :-) (And with a little luck I might be able to use Purify also in
the first week of October).

Michael


Reply via email to