From: Abdelrazak Younes Date: Fri, 5 Jan 2007 15:35:10 +0000 (+0000) Subject: The bug-fix in revision 16531 introduced another bug. This is the right fix. I did... X-Git-Tag: 1.6.10~11324 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0b995c888f094df29d6f00d2f4d4e6717ed23ea2;hp=594a589bc46be12e99c20fa7be65e713c3fabb24;p=lyx.git The bug-fix in revision 16531 introduced another bug. This is the right fix. I did not understood correctly what was anchor_ref_. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16536 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.C b/src/BufferView.C index bac8364e2b..927d1f1ad6 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -1331,6 +1331,7 @@ ViewMetricsInfo const & BufferView::viewMetricsInfo() } +// FIXME: We should split-up updateMetrics() for the singlepar case. void BufferView::updateMetrics(bool singlepar) { LyXText & buftext = buffer_->text(); @@ -1342,13 +1343,10 @@ void BufferView::updateMetrics(bool singlepar) offset_ref_ = 0; } - // In singlepar mode, the anchor has to be reset because - // there is no metrics update with keyboard mouvement or - // mouse clicking if this didn't resulted in scrolling. - // FIXME: We should splitup updateMetrics() for the singlepar - // case. - if (singlepar) - anchor_ref_ = cursor_.bottom().pit(); + // If the paragraph metrics has changed, we can not + // use the singlepar optimisation. + if (singlepar && tm.redoParagraph(cursor_.bottom().pit())) + singlepar = false; pit_type const pit = anchor_ref_; int pit1 = pit;