Abdelrazak Younes wrote:
Bennett Helm wrote:
On Jul 16, 2007, at 11:45 AM, Abdelrazak Younes wrote:

Bennett Helm wrote:
I'm using pdfsync via lyxpipe to have LyX jump to where I click in the .pdf file of an open LyX document. Recently I've been getting crashes. Here's the console output: Assertion triggered in void lyx::Text::setCursorIntern(lyx::Cursor&, lyx::pit_type, lyx::pos_type, bool, bool) by failing check "this == cur.text()" in file Text2.cpp:746
Is there more info I should provide?

A backtrace :-)

How's this? --

Assertion triggered in void lyx::Text::setCursorIntern(lyx::Cursor&, lyx::pit_type, lyx::pos_type, bool, bool) by failing check "this == cur.text()" in file Text2.cpp:746

Could you please verify that your cursor was not within an inset before using pdfsync? Could you also try to reproduce the crash when the cursor is in the _main_ text? If you cannot, then I might be able to cure this bug.

If you confirm then you might want to try the attached patch.

Abdel.

Index: BufferView.cpp
===================================================================
--- BufferView.cpp      (revision 19080)
+++ BufferView.cpp      (working copy)
@@ -1259,6 +1259,7 @@
 
        buffer_->texrow().getIdFromRow(row, tmpid, tmppos);
 
+       cursor_.reset(buffer_->inset());
        if (tmpid == -1)
                buffer_->text().setCursor(cursor_, 0, 0);
        else

Reply via email to