From b751c74fe1fd678783b9c3cd9725aeed911d4c0f Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Tue, 14 Mar 2006 14:47:24 +0000 Subject: [PATCH] Fix to bug 2325: Mouse click to right of last nestinset in a cell will position cursor to its left git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13370 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 5 +++++ src/mathed/math_data.C | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 042e312e9b..2a8defab02 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2006-03-14 Martin Vermeer + + * math_data.C (x2pos): Fix to bug 2325: Mouse click to right of last + nestinset in a cell will position cursor to its left + 2006-03-11 Martin Vermeer * math_scriptinset.C (notifyCursorLeaves): Fix to bug 2362: Deleting diff --git a/src/mathed/math_data.C b/src/mathed/math_data.C index 790034aa1c..462cd45ca1 100644 --- a/src/mathed/math_data.C +++ b/src/mathed/math_data.C @@ -393,7 +393,7 @@ MathArray::size_type MathArray::x2pos(int targetx, int glue) const * the right one. * See bug 1918 for details. **/ - if (it != begin() + if (it != begin() && currx >= targetx && ((*boost::prior(it))->asNestInset() || abs(lastx - targetx) < abs(currx - targetx))) { --it; -- 2.39.5