From 3852f3298f56471e9af7ea28b9daed3c040178a4 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 21 Nov 2009 01:15:12 +0000 Subject: [PATCH] * TextMetrics.cpp: cosmetics. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32117 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TextMetrics.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index fe7a928e14..336d75f536 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1495,8 +1495,8 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y, int yy = y; // is modified by getPitAndRowNearY Row const & row = getPitAndRowNearY(yy, pit, assert_in_view, up); - bool bound = false; + bool bound = false; // is modified by getColumnNearX int xx = x; // is modified by getColumnNearX pos_type const pos = row.pos() + getColumnNearX(pit, row, xx, bound); @@ -1518,17 +1518,16 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y, } ParagraphList const & pars = text_->paragraphs(); - Inset const * insetBefore = pos ? pars[pit].getInset(pos - 1) : 0; - //Inset * insetBehind = pars[pit].getInset(pos); + Inset const * inset_before = pos ? pars[pit].getInset(pos - 1) : 0; // This should be just before or just behind the // cursor position set above. - LASSERT((pos != 0 && inset == insetBefore) + LASSERT(inset == inset_before || inset == pars[pit].getInset(pos), /**/); // Make sure the cursor points to the position before // this inset. - if (inset == insetBefore) { + if (inset == inset_before) { --cur.pos(); cur.boundary(false); } -- 2.39.5