diff --git a/src/ChangeLog b/src/ChangeLog index ccc3d3b591..4f1f27de2b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-01-29 Jean-Marc Lasgouttes + + * text3.C (cursorPrevious, cursorNext): take the selection() + status of the cursor in account. + 2007-01-19 Jean-Marc Lasgouttes * output_plaintext.C (asciiParagraph): output things in the right diff --git a/src/text3.C b/src/text3.C index 8acaa162c9..d14d287a14 100644 --- a/src/text3.C +++ b/src/text3.C @@ -203,12 +203,12 @@ bool LyXText::cursorPrevious(LCursor & cur) 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();