From: John Levon Date: Fri, 20 Dec 2002 14:28:28 +0000 (+0000) Subject: fix for page up/down across tall rows, with requisite #if 0 X-Git-Tag: 1.6.10~17746 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3e44f652fe8b65d159b1096736f094686cbd2322;p=lyx.git fix for page up/down across tall rows, with requisite #if 0 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5886 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index b152a761e4..a461a04515 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-12-20 John Levon + + * text3.C: hack fix for page up/down across tall rows + 2002-12-17 Jean-Marc Lasgouttes * text2.C (pasteEnvironmentType): avoid crash if layout-copy has diff --git a/src/text3.C b/src/text3.C index 48bc0c0a7e..a24e28d625 100644 --- a/src/text3.C +++ b/src/text3.C @@ -258,12 +258,15 @@ void LyXText::cursorPrevious(BufferView * bv) int new_y; if (cursorrow == bv->text->cursor.row()) { - // we have a row which is higher than the workarea so we leave the - // cursor on the start of the row and move only the draw up as soon - // as we move the cursor or do something while inside the row (it may - // span several workarea-heights) we'll move to the top again, but this - // is better than just jump down and only display part of the row. + // we have a row which is taller than the workarea. The + // simplest solution is to move to the previous row instead. + cursorUp(bv, true); + return; + // This is what we used to do, so we wouldn't skip right past + // tall rows, but it's not working right now. +#if 0 new_y = bv->text->first_y - bv->workHeight(); +#endif } else { if (inset_owner) { new_y = bv->text->cursor.iy() @@ -319,12 +322,15 @@ void LyXText::cursorNext(BufferView * bv) int new_y; if (cursorrow == bv->text->cursor.row()) { - // we have a row which is higher than the workarea so we leave the - // cursor on the start of the row and move only the draw down as soon - // as we move the cursor or do something while inside the row (it may - // span several workarea-heights) we'll move to the top again, but this - // is better than just jump down and only display part of the row. + // we have a row which is taller than the workarea. The + // simplest solution is to move to the next row instead. + cursorDown(bv, true); + return; + // This is what we used to do, so we wouldn't skip right past + // tall rows, but it's not working right now. +#if 0 new_y = bv->text->first_y + bv->workHeight(); +#endif } else { if (inset_owner) { new_y = bv->text->cursor.iy()