Abdelrazak Younes wrote:
Recipe:
1) open the attached document
2) press arrow down key as many times as needed to reach the bottom of
the LyX screen.
3) crash when attempting to move down to the next line (off-screen).
The crash happens in bruteFind2 (cursor.C line 99):
InsetBase const * inset = &it.inset();
Point o = c.bv().coordCache().getInsets().xy(inset);
I think the problem is that the next inset is not fully in the
CoordCache. Only the top part of the formula in the next line is visible
on screen.
I guess one solution would be to make sure that the CoordCache is
updated before the call to bruteFind2 in LCursor::goUpDown(), which
means to call BufferView::FitCursor() before. But then the update logic
would be completely perverted.
There is no crash if I use bruteFind3 instead in LCursor::goUpDown():
// FIXME: Switch this on for more robust movement
#if 1
return bruteFind3(*this, xo, yo, up);
#else
I have a question for those who knows:
Why is it that we use LCursor::goUpDown() to go down within a formula?
Logically, we should know where we are within the formula and we should
be able to descend inside the formula using that information. There
should be no need to use screen oriented information at all within a
formula. At last resort if we end up moving out of the formula, we have
to know where we are with regard to the current top-level paragraph; bu
not before.
Abdel.