On Thu, Oct 16, 2003 at 10:34:36AM +0200, Lars Gullik Bjønnes wrote: > | There is no need to repeat the 'assert on pos != size' story. > > But you are now allowing blantatly wrong cursors to just be trasformed > into something valid.
But it enables people to use 1.4.0cvs and we were aiming for a release after a few people have used it, don't we? > And it is these kind of special values that is never really ok, This is a sentinel to catch exactly the kind of 'late crashes' we've seen after the conversion to list<Paragraph>. > but we add small workarounds here and there, that makes code > ununderstandable and unreadable. > > When is it ok for a cursor par to have a value of -1? Never. This is just to catch situations where a text is used but its cursor is not explicitly initialized. This is not really 'blatantly wrong' and a reason for an assert. In fact the pre-parlist code simply ignored that situation with using a 0 Paragraph* in the 'uninitialized cursor'. We could mimic old behaviour by initializing the paragraph to 0 in the LyXCursor constructor and get exactly pre-parlist behaviour (i.e. no crashes, no warning). Getting the warning, however, is a means to detect bad logic. And while the old code simply ignored it and the current code crashes I thought it would be better to fix it. I need the warning for that and 1.4.0cvs needs users. We can have both. Were is the _real_ problem? *sigh* Could we please stop going into politics every day? This costs me a lot of time and annoys me greatly. I am just trying to fix a couple of things as long as I can. If you have other goals, please say so and I'll shut up. Andre'