15/07/2013 00:20, Jean-Marc Lasgouttes:
Something very weird: when moving in the long formula, the
"Math-Formula" title moves, whereas it should not. I tried to debug
this, but do not understand yet why it happens...

OK, after spending a lot of time staring at the code, I founf out that there is a bug in Cursor::textRow when cursor is in a math inset.

I committed a fix to the scroll/testing branch. Please pull it locally before continuing your work.

JMarc

PS: I attach the patch, which actually should go to master as soon as this is open again.



>From c02c4722dc6b0de10a1a9a4511e8823e3e91b65b Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Mon, 15 Jul 2013 16:22:28 +0200
Subject: [PATCH] Fix Cursor::textRow when cursor is in a math inset.

---
 src/Cursor.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index fc71022..d29a76f 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -538,7 +538,8 @@ Row const & Cursor::textRow() const
 {
 	CursorSlice const & cs = innerTextSlice();
 	ParagraphMetrics const & pm = bv().parMetrics(cs.text(), cs.pit());
-	return pm.getRow(pos(), boundary());
+	bool const bndry = inTexted() ? boundary() : false;
+	return pm.getRow(cs.pos(), bndry);
 }
 
 int Cursor::getLeftEdge() const
-- 
1.7.0.4

Reply via email to