On Mon, May 14, 2007 at 08:03:41PM -0000, [EMAIL PROTECTED] wrote: > Author: broider > Date: Mon May 14 22:03:40 2007 > New Revision: 18323 > > URL: http://www.lyx.org/trac/changeset/18323 > Log: > add comments and rtl support for cursor positioning problem > > Modified: > lyx-devel/trunk/src/Text2.cpp > > Modified: lyx-devel/trunk/src/Text2.cpp > URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Text2.cpp?rev=18323 > ============================================================================== > --- lyx-devel/trunk/src/Text2.cpp (original) > +++ lyx-devel/trunk/src/Text2.cpp Mon May 14 22:03:40 2007 > @@ -993,8 +993,16 @@ > > int x = cur.targetX(); > cur.setTargetX(); > - if (cur.pos() != pm.rows()[row].endpos() || x < cur.targetX()) > + // We want to keep the x-target on subsequent up movements > + // that cross beyond the end of short lines. Thus a special > + // handling when the cursor is at the end of line: Use the new > + // x-target only if the old one was before the end of line. > + if (cur.pos() != pm.rows()[row].endpos() > + || (!cur.isRTL() && x < cur.targetX()) > + || (cur.isRTL() && x > cur.targetX())) { > + > x = cur.targetX(); > + }
Can anybody remind me why we change targetX for cursor up/down at all? Andre'