Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> No, I am not saying that. I was just clarifying the
Abdelrazak> matter. I think there are two solutions:

Abdelrazak> 1) make sure that the coordCache is up to date at the end
Abdelrazak> of any user action. This was probably the case before my
Abdelrazak> change. And the reason why this crash is appearing only
Abdelrazak> now.

Abdelrazak> 2) For any user action, make sure that
Abdelrazak> BufferView::pimpl::update() is called at least once before
Abdelrazak> the coorCache is used. IMHO, this will be elegantly solved
Abdelrazak> at the frontend level who knows about the metrics.

You mean BufferView::pimpl::metrics, right? This should be the first
step of the so-called two-steps update.

Right. And in the case of this crash there is no call to this update before using the coordCache in LyXText::getPitNearY() for example.


Abdelrazak> And I believe also that's one of the reason of the
Abdelrazak> slowness of 1.4 compared with 1.3. I think it's better to
Abdelrazak> fix that issue early rather that later.
I agree that the slowness is related to this code.

Abdelrazak> But point taken, don't worry, I am careful with that ;-)

Yes, the problem is not to get the common cases working, but the rest!

Yes I have already defined some tests for the use cases. Here is a test procedure that tests quite a few use cases:

1) open one doc and test typing, math typing, keyboard selection, mouse selection, keyboard scrolling, mouse scrolling, Cut&Paste, etc. Verify that the cursor behaves correctly for all the tests.

2) open another document,
  * switch to the first one,
  * verify that the cursor is at the same position you lived it.

3) switch back to the second document, do the same tests as 1)

4) switch back and forth between the two docs
  * verify that everything is OK wrt cursor position.
  * repeat the test when one of the cursor is within an inset
  * repeat the test when one of the cursor is within math

5) close one document, repeat the tests in 1)

6) close the second document.

7) close Lyx.

Abdel.

Reply via email to