* text3.C (cursorPrevious, cursorNext): take the selection()

status of the cursor in account.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16928 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2007-01-29 14:49:26 +00:00
parent 2b1c262477
commit 6e4f3afcac
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2007-01-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text3.C (cursorPrevious, cursorNext): take the selection()
status of the cursor in account.
2007-01-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* output_plaintext.C (asciiParagraph): output things in the right

View File

@ -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();