Somewhat better testet. Same patch. Ok to apply?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.950
diff -u -p -r1.950 ChangeLog
--- ChangeLog   8 Oct 2002 09:24:01 -0000       1.950
+++ ChangeLog   10 Oct 2002 15:27:09 -0000
@@ -1,3 +1,9 @@
+
+2002-10-07 André Pönitz <[EMAIL PROTECTED]>
+
+       * lytext.h: make some functions public to allow access
+       from inset/lyxtext for handling LFUN_PRIOR/NEXT
+
 2002-10-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
        * lyxrc.C (read): treat a viewer or converter command of "none" as
Index: lyxtext.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtext.h,v
retrieving revision 1.127
diff -u -p -r1.127 lyxtext.h
--- lyxtext.h   29 Aug 2002 12:00:50 -0000      1.127
+++ lyxtext.h   10 Oct 2002 15:27:09 -0000
@@ -346,6 +346,10 @@ public:
        ///
        void cursorEnd(BufferView *) const;
        ///
+       void cursorPrevious(BufferView * bv);
+       ///
+       void cursorNext(BufferView * bv);
+       ///
        void cursorTab(BufferView *) const;
        ///
        void cursorTop(BufferView *) const;
@@ -487,10 +491,6 @@ private:
 
        ///
        void cursorLeftOneWord(LyXCursor &) const;
-       ///
-       void cursorPrevious(BufferView * bv);
-       ///
-       void cursorNext(BufferView * bv);
  
        ///
        float getCursorX(BufferView *, Row *, lyx::pos_type pos,
Index: insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.523
diff -u -p -r1.523 ChangeLog
--- insets/ChangeLog    26 Sep 2002 08:59:34 -0000      1.523
+++ insets/ChangeLog    10 Oct 2002 15:27:10 -0000
@@ -1,3 +1,8 @@
+
+2002-10-07 André Pönitz <[EMAIL PROTECTED]>
+
+       * insettext.h: handle LFUN_PRIOR/NEXT
+
 2002-07-30  Juergen Spitzmueller <[EMAIL PROTECTED]>
 
         * insetfloat.C: fix bug with float settings
Index: insets/insettext.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.332
diff -u -p -r1.332 insettext.C
--- insets/insettext.C  25 Sep 2002 14:26:12 -0000      1.332
+++ insets/insettext.C  10 Oct 2002 15:27:10 -0000
@@ -1340,6 +1340,24 @@ Inset::RESULT InsetText::localDispatch(F
                lt->cursorEnd(bv);
                updwhat = CURSOR;
                break;
+       case LFUN_PRIOR:
+               if (!crow(bv)->previous())
+                       result = FINISHED_UP;
+               else {
+                       lt->cursorPrevious(bv);
+                       result = DISPATCHED_NOUPDATE;
+               }
+               updwhat = CURSOR;
+               break;
+       case LFUN_NEXT:
+               if (!crow(bv)->next())
+                       result = FINISHED_DOWN;
+               else {
+                       lt->cursorNext(bv);
+                       result = DISPATCHED_NOUPDATE;
+               }
+               updwhat = CURSOR;
+               break;
        case LFUN_BACKSPACE: {
                setUndo(bv, Undo::DELETE,
                        lt->cursor.par(), lt->cursor.par()->next());
@@ -1896,8 +1914,7 @@ InsetText::moveLeftIntern(BufferView * b
 }
 
 
-Inset::RESULT
-InsetText::moveUp(BufferView * bv)
+Inset::RESULT InsetText::moveUp(BufferView * bv)
 {
        if (!crow(bv)->previous())
                return FINISHED_UP;
@@ -1906,8 +1923,7 @@ InsetText::moveUp(BufferView * bv)
 }
 
 
-Inset::RESULT
-InsetText::moveDown(BufferView * bv)
+Inset::RESULT InsetText::moveDown(BufferView * bv)
 {
        if (!crow(bv)->next())
                return FINISHED_DOWN;

Reply via email to