Author: vfr Date: Sat Aug 22 16:34:50 2009 New Revision: 31199 URL: http://www.lyx.org/trac/changeset/31199
Log: Fix inset-begin and inset-end. Now, if the cursor was at the beginning of a paragraph in the middle of the inset, inset-begin would jump out of the inset. Modified: lyx-devel/trunk/src/Text3.cpp Modified: lyx-devel/trunk/src/Text3.cpp ======================================================================== ====== --- lyx-devel/trunk/src/Text3.cpp Sat Aug 22 16:04:23 2009 (r31198) +++ lyx-devel/trunk/src/Text3.cpp Sat Aug 22 16:34:50 2009 (r31199) @@ -624,7 +624,7 @@ case LFUN_INSET_BEGIN: case LFUN_INSET_BEGIN_SELECT: needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_BEGIN_SELECT); - if (cur.depth() == 1 || cur.pos() > 0) + if (cur.depth() == 1 || !cur.top().at_begin()) needsUpdate |= cursorTop(cur); else cur.undispatched(); @@ -634,7 +634,7 @@ case LFUN_INSET_END: case LFUN_INSET_END_SELECT: needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_END_SELECT); - if (cur.depth() == 1 || cur.pos() < cur.lastpos()) + if (cur.depth() == 1 || !cur.top().at_end()) needsUpdate |= cursorBottom(cur); else cur.undispatched(); Juergen, This fixes the new feature that was introduced in 1.6.4, but had a little bug as described above. Ok for branch ? Vincent