]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.h
Hotfix to move cursor to the right when pressing M-m g x in text mode.
[lyx.git] / src / lyxcursor.h
index cc7cb9ef90b91f22d5755a4db3353a2b323314ca..fe3cc2842cc6af2cd158c6b781859f7b6acdec79 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -44,6 +44,10 @@ public:
        ///
        int x() const;
        ///
+       void ix(int i);
+       ///
+       int ix() const;
+       ///
        void x_fix(int i);
        ///
        int x_fix() const;
@@ -52,6 +56,10 @@ public:
        ///
        int y() const;
        ///
+       void iy(int i);
+       ///
+       int iy() const;
+       ///
        void row(Row * r);
        ///
        Row * row() const;
@@ -64,10 +72,16 @@ private:
        bool boundary_;
        ///
        int x_;
+       /// the x position of the position before the inset when we put
+       /// the cursor on the end of the row before, otherwise equal to x.
+       int ix_;
        ///
        int x_fix_;
        ///
        int y_;
+       /// the y position of the position before the inset when we put
+       /// the cursor on the end of the row before, otherwise equal to y.
+       int iy_;
        ///
        Row * row_;
 };
@@ -90,7 +104,7 @@ bool operator!=(LyXCursor const & a, LyXCursor const & b)
 
 ///
 inline
-bool operator<(LyXCursor const & a, LyXCursor const & b) 
+bool operator<(LyXCursor const & a, LyXCursor const & b)
 {
        // Can this be done in a nother way?
        return (a.y() < b.y() && a.pos() < b.pos());
@@ -98,7 +112,7 @@ bool operator<(LyXCursor const & a, LyXCursor const & b)
 
 ///
 inline
-bool operator>(LyXCursor const & a, LyXCursor const & b) 
+bool operator>(LyXCursor const & a, LyXCursor const & b)
 {
        return b < a;
 }