#include "Bidi.h"
#include "Buffer.h"
+#include "BufferView.h"
#include "Font.h"
#include "Row.h"
#include "LyXRC.h"
return;
}
- if (par.ownerCode() == Inset::ERT_CODE) {
+ if (par.ownerCode() == Inset::ERT_CODE || par.ownerCode() == Inset::LISTINGS_CODE) {
start_ = -1;
return;
}
}
+bool reverseDirectionNeeded(Cursor const & cur)
+{
+ /*
+ * We determine the directions based on the direction of the
+ * bottom() --- i.e., outermost --- paragraph, because that is
+ * the only way to achieve consistency of the arrow's movements
+ * within a paragraph, and thus avoid situations in which the
+ * cursor gets stuck.
+ */
+ return cur.bottom().paragraph().isRightToLeftPar(
+ cur.bv().buffer()->params());
+}
+
+
+bool isWithinRtlParagraph(Cursor const & cur)
+{
+ return cur.innerParagraph().isRightToLeftPar(
+ cur.bv().buffer()->params());
+}
+
} // namespace lyx