> PS: by the way, I haven't read the list for maybe 10 days and I don't > think I'll have the time to read the archive. So, if there's something > requiring my help, please bring the subject back to the list.
Please have a look at this patch. Original email and patch attached. Thanks. Bo Dear all, The attached patch addresses the following problem: line1 line2<line break> <empty line> line 3 1. Click after line2, the cursor moves to the empty line (unnatural behavior) 2. from the end of line1, down arrow moves the cursor to the empty line, instead of end of line2 (unnatural behavior) 3. continue from 2, up arrow failes to move the cursor. (Bug) Problem: When clicking after line2, the cursor moves to the end of line 2, which is actually the empty line because the end of paragraph is a linebreak. The bug (behavior 3) is caused by the fact that lyx tries to move the cursor to line 2, but ends up to the empty line again. Solution: Move to the end of the paragraph only if the last inset is not InsetNewline Abdel: Please have a look at this patch. svn blames you for the code, although you might not be the original author. Jurgen: Please test this patch, because I am notorious at introducing bugs to the branch. :-) Cheers, Bo
Index: src/TextMetrics.cpp =================================================================== --- src/TextMetrics.cpp (revision 22660) +++ src/TextMetrics.cpp (working copy) @@ -893,9 +893,10 @@ bool const rtl = lastrow ? text_->isRTL(buffer, par) : false; if (lastrow && ((rtl && left_side && vc == row.pos() && x < tmpx - 5) || - (!rtl && !left_side && vc == end && x > tmpx + 5))) - c = end; - else if (vc == row.pos()) { + (!rtl && !left_side && vc == end && x > tmpx + 5))) { + if (!par.isNewline(end - 1)) + c = end; + } else if (vc == row.pos()) { c = bidi.vis2log(vc); if (bidi.level(c) % 2 == 1) ++c;