This patch avoids doing a full rebreak on buffer switching, which is the
reason for the existence of the TextCache.
The removed full rebreak is unneeded: it is done in every case (except from
buffer switching) above in the same function.

The update seems also to be unneeded, as caller functions do it anyways.

The fact that this has gone unnoticed maybe raises a question on the
usefullness of the TextCache?

Alfredo

Index: BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.437
diff -u -p -u -r1.437 BufferView_pimpl.C
--- BufferView_pimpl.C  12 Sep 2003 17:13:18 -0000      1.437
+++ BufferView_pimpl.C  16 Sep 2003 08:13:16 -0000
@@ -428,7 +428,6 @@ void BufferView::Pimpl::resizeCurrentBuf
                mark_set = bv_->text->selection.mark();
                the_locking_inset = bv_->theLockingInset();
                bv_->text->fullRebreak();
-               update();
        } else {
                lyxerr << "text not available!" << endl;
                // See if we have a text in TextCache that fits
@@ -454,10 +453,6 @@ void BufferView::Pimpl::resizeCurrentBuf
                selstartpar = bv_->text->ownerParagraphs().end();
                selendpar = bv_->text->ownerParagraphs().end();
        }
-
-#warning does not help much
-       bv_->text->redoParagraphs(bv_->text->ownerParagraphs().begin(),
-               bv_->text->ownerParagraphs().end());
 
        if (par != bv_->text->ownerParagraphs().end()) {
                bv_->text->selection.set(true);

Reply via email to