X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBidi.cpp;h=37cb87520a1e0f31b5a1ce84ef7e9d6bbf3fcc8a;hb=66561205e371dcd755f2187d562872c08ea582da;hp=8c3a81b208aae612dc72bc2355dffb76824d1f0d;hpb=55a26d72d446be48188b26fa494d5fe2b24437f4;p=lyx.git diff --git a/src/Bidi.cpp b/src/Bidi.cpp index 8c3a81b208..37cb87520a 100644 --- a/src/Bidi.cpp +++ b/src/Bidi.cpp @@ -95,7 +95,14 @@ void Bidi::computeTables(Paragraph const & par, pos_type const body_pos = par.beginOfBody(); for (pos_type lpos = start_; lpos <= end_; ++lpos) { - bool is_space = par.isLineSeparator(lpos); + bool is_space = false; + // We do not handle spaces around an RTL segment in a special way anymore. + // Neither do we do so when generating the LaTeX, so setting is_space + // to false makes the view in the GUI consistent with the output of LaTeX + // later. The old setting was: + //bool is_space = par.isLineSeparator(lpos); + // FIXME: once we're sure that this is what we really want, we should just + // get rid of this variable... pos_type const pos = (is_space && lpos + 1 <= end_ && !par.isLineSeparator(lpos + 1) && @@ -210,7 +217,7 @@ bool Bidi::isBoundary(Buffer const & buf, Paragraph const & par, } -bool reverseDirectionNeeded(Cursor const & cur) +bool reverseDirectionNeeded(Cursor const & cur) { /* * We determine the directions based on the direction of the @@ -224,4 +231,10 @@ bool reverseDirectionNeeded(Cursor const & cur) } +bool isWithinRtlParagraph(Cursor const & cur) +{ + return cur.innerParagraph().isRightToLeftPar( + cur.bv().buffer()->params()); +} + } // namespace lyx