]> git.lyx.org Git - features.git/commitdiff
fix for page up/down across tall rows, with requisite #if 0
authorJohn Levon <levon@movementarian.org>
Fri, 20 Dec 2002 14:28:28 +0000 (14:28 +0000)
committerJohn Levon <levon@movementarian.org>
Fri, 20 Dec 2002 14:28:28 +0000 (14:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5886 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text3.C

index b152a761e48a4c47270374cd252c8fdf3f3126b2..a461a045155eec4f6ffda4f9f633c98b94aa34d6 100644 (file)
@@ -1,3 +1,7 @@
+2002-12-20  John Levon  <levon@movementarian.org>
+
+       * text3.C: hack fix for page up/down across tall rows
+
 2002-12-17  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * text2.C (pasteEnvironmentType): avoid crash if layout-copy has
index 48bc0c0a7edcc4c91d81b5052a6ee7b7f0c730ed..a24e28d625c444cbdc2cd17bf48c44eafda7ffa6 100644 (file)
@@ -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()