This patch backports a 1.5 fix that was only partly applied by Enrico:
since the selection() status of the cursor was not take in account,
Shift+pagedown would lose the selection at times.
I'll commit now since it is already in 1.5, and I did test it.
JMarc
Index: src/text3.C
===================================================================
--- src/text3.C (revision 16926)
+++ src/text3.C (working copy)
@@ -203,12 +203,12 @@ bool LyXText::cursorPrevious(LCursor & c
bool updated = setCursorFromCoordinates(cur, x, 0);
if (updated)
cur.bv().update();
- cur.dispatch(FuncRequest(LFUN_UP));
+ cur.dispatch(FuncRequest(cur.selection()? LFUN_UPSEL: LFUN_UP));
if (cpar == cur.pit() && cpos == cur.pos()) {
// we have a row which is taller than the workarea. The
// simplest solution is to move to the previous row instead.
- cur.dispatch(FuncRequest(LFUN_UP));
+ cur.dispatch(FuncRequest(cur.selection()? LFUN_UPSEL: LFUN_UP));
}
cur.bv().updateScrollbar();
@@ -226,12 +226,12 @@ bool LyXText::cursorNext(LCursor & cur)
bool updated = setCursorFromCoordinates(cur, x, cur.bv().workHeight() - 1);
if (updated)
cur.bv().update();
- cur.dispatch(FuncRequest(LFUN_DOWN));
+ cur.dispatch(FuncRequest(cur.selection()? LFUN_DOWNSEL: LFUN_DOWN));
if (cpar == cur.pit() && cpos == cur.pos()) {
// we have a row which is taller than the workarea. The
// simplest solution is to move to the next row instead.
- cur.dispatch(FuncRequest(LFUN_DOWN));
+ cur.dispatch(FuncRequest(cur.selection()? LFUN_DOWNSEL: LFUN_DOWN));
}
cur.bv().updateScrollbar();