From: Abdelrazak Younes Date: Mon, 20 Nov 2006 16:43:36 +0000 (+0000) Subject: Fix crash when closing the last buffer and add a FIXME. X-Git-Tag: 1.6.10~11808 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=37ee9727f7d7be0c566481e729254edda5fe34d3;p=features.git Fix crash when closing the last buffer and add a FIXME. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15998 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.C b/src/BufferView.C index 0689719a21..a9148643b7 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -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_);