Please note the following strange piece of code from inset.h:404 which causes the problem: virtual LyXText * getText(int /*num*/) const { return 0; } That is, when you're asking an inset to recieve its text you're getting NULL, however, the CursorSlice object uses (inset_.getText()) in order to return it's paragraph. Obviously when null object is used - segfaults occurs. I just don't know the code enough to fix it. 1) What is CursorSlice, and what's the different between it and Cursor? 2) What's the flow of the program when moving the cursor? What's being called? What if the cursor is moved in-out of an inset?
On 4/30/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote:
Elazar Leibovich wrote: > Hold on. It does segfaults, but this is not me, this is the isRTL > function implemented in Cursor.cpp. It's fails when it tries to ask a > LyxText from the CursorSlice it occurs in. > Can someone help me fix this function? Yes, I see the problem now: When in mathed, the top CursorSlice is not a text inset. > How can I get to the head of the paragraph (or some place not in an > inset) that the inset my cursor is currently pointing at, is found? > Any references? I'll try to look at it. Abdel.