On 24-Apr-2002 Claus Hindsgaul wrote:
> ons, 2002-04-24 kl. 15:27 skrev John Levon:
>> > Did that help?
>> 
>> No ! Look at the backtrace yourself then look at the source they are
>> completely different. Perhaps a valgrind bug ?

Thanks for your backtraces (and patience). Would it be possible for you to
apply the attached patch to an updated cvs version and see if that fixes the
problem for you?

      Jug

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

I doubt, therefore I might be.

Index: src/screen.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/screen.C,v
retrieving revision 1.62
diff -u -p -r1.62 screen.C
--- src/screen.C        5 Apr 2002 15:17:24 -0000       1.62
+++ src/screen.C        29 Apr 2002 13:33:13 -0000
@@ -135,6 +135,11 @@ void LyXScreen::drawFromTo(LyXText * tex
                                text->setCursor(bv, text->cursor.par(), 
text->cursor.pos());
                        }
                        text->status(bv, st);
+                       // we should be sure our row-pointer is still valid, so it's
+                       // better to recompute it.
+                       y_text = y + text->first_y;
+                       row = text->getRowNearY(y_text);
+                       y = y_text - text->first_y;
                        text->getVisibleRow(bv, y + y_offset,
                                            x_offset, row, y + text->first_y);
                }
@@ -161,18 +166,7 @@ void LyXScreen::drawOneRow(LyXText * tex
        if (((y + row->height()) > 0) &&
            ((y - row->height()) <= static_cast<int>(owner.height()))) {
                // ok there is something visible
-#if 0
-               LyXText::text_status st = bv->text->status();
-               do {
-                       bv->text->status(bv, st);
-                       text->getVisibleRow(bv, y, x_offset, row,
-                                           y + text->first_y);
-               } while (!text->inset_owner &&
-                        text->status() == LyXText::CHANGED_IN_DRAW);
-               bv->text->status(bv, st);
-#else
                text->getVisibleRow(bv, y, x_offset, row, y + text->first_y);
-#endif
        }
        force_clear = false;
 }

Reply via email to