diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 2a4cc26f0e..5e41617770 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -970,16 +970,19 @@ void BufferView::Pimpl::update() { LyXText::text_status st = bv_->text->status(); screen_->update(bv_->text, bv_); + bool fitc = false; while(bv_->text->status() == LyXText::CHANGED_IN_DRAW) { if (bv_->text->fullRebreak(bv_)) { st = LyXText::NEED_MORE_REFRESH; bv_->text->setCursor(bv_, bv_->text->cursor.par(), bv_->text->cursor.pos()); - fitCursor(); + fitc = true; } bv_->text->status(bv_, st); screen_->update(bv_->text, bv_); } + if (fitc) + fitCursor(); } } diff --git a/src/ChangeLog b/src/ChangeLog index f8a2dda21c..ab8ade4619 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2001-08-03 Juergen Vigna + + * BufferView_pimpl.C (update): do the fitCursor only at the end! + + * screen.C (drawFromTo): don't call fitcursor here and do the loop + only if status not is already CHANGED_IN_DRAW (second level). + + * text.C (draw): don't set the need_break_row when inside an + InsetText LyXText. + 2001-08-02 Lars Gullik Bjønnes * buffer.C (parseSingleLyXformat2Token): handle more latex diff --git a/src/screen.C b/src/screen.C index f2c195a559..ba1dc7dec4 100644 --- a/src/screen.C +++ b/src/screen.C @@ -128,11 +128,11 @@ void LyXScreen::drawFromTo(LyXText * text, BufferView * bv, LyXText::text_status st = text->status(); text->getVisibleRow(bv, y + y_offset, x_offset, row, y + text->first); + internal = internal && (st != LyXText::CHANGED_IN_DRAW); while(internal && text->status() == LyXText::CHANGED_IN_DRAW) { if (text->fullRebreak(bv)) { st = LyXText::NEED_MORE_REFRESH; text->setCursor(bv, text->cursor.par(), text->cursor.pos()); - bv->fitCursor(); } text->status(bv, st); text->getVisibleRow(bv, y + y_offset, diff --git a/src/text.C b/src/text.C index 6d14ad0b2b..f94a16403f 100644 --- a/src/text.C +++ b/src/text.C @@ -440,7 +440,7 @@ void LyXText::draw(BufferView * bview, Row const * row, tmpinset->update(bview, font, false); tmpinset->draw(bview, font, offset+row->baseline(), x, cleared); - if (!need_break_row && + if (!need_break_row && !inset_owner && bview->text->status() == CHANGED_IN_DRAW) { if (row->previous() && row->previous()->par() == row->par())