]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Some comments.
[lyx.git] / src / Cursor.cpp
index 81357ccc2161735fca39c5ce6a73652338a8ed15..e41ea638b64590a1d74cb797906486c7b8ac9788 100644 (file)
@@ -567,6 +567,14 @@ bool Cursor::posVisToNewRow(bool movingLeft)
        Buffer const & buf = buffer();
        Row const & row = textRow();
        bool par_is_LTR = !par.isRTL(buf.params());
+
+       // Inside a table, determining whether to move to the next or previous row
+       // should be done based on the table's direction. 
+       int s = depth() - 1;
+       if (s >= 1 && (*this)[s].inset().asInsetTabular()) {
+               par_is_LTR = !(*this)[s].inset().asInsetTabular()->isRightToLeft(*this);
+               LYXERR(Debug::RTL, "Inside table! par_is_LTR=" << (par_is_LTR ? 1 : 0));
+       }
        
        // if moving left in an LTR paragraph or moving right in an RTL one, 
        // move to previous row