+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());
+}
+