]> git.lyx.org Git - features.git/commitdiff
Fix crash when closing the last buffer and add a FIXME.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 20 Nov 2006 16:43:36 +0000 (16:43 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 20 Nov 2006 16:43:36 +0000 (16:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15998 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.C

index 0689719a21a0eea22895f06402c09ce41141aef3..a9148643b7dabfdb4623d7007f93a903f0f999d8 100644 (file)
@@ -197,7 +197,11 @@ void BufferView::setBuffer(Buffer * b)
                }
        }
 
-       updateMetrics(false);
+       // FIXME: in principle, a simple call to updateMetrics(false) should
+       // be enough here. But, for unknown reason, it seems that only the line
+       // of the cursor is updated in the CoordCache.
+       if (buffer_)
+               updateMetrics(false);    
 
        if (buffer_ && graphics::Previews::status() != LyXRC::PREVIEW_OFF)
                graphics::Previews::get().generateBufferPreviews(*buffer_);