X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftext.C;h=46259d4d8b7b5f20dc52bf6fc9ba559670616bea;hb=2523638092e2024bac408eee98ad2094bc4e4089;hp=03f7607331be859d865dbf62da40c5e0837c39b2;hpb=293767645f75c540a48e9498ec5dca6aabdd5455;p=lyx.git diff --git a/src/text.C b/src/text.C index 03f7607331..46259d4d8b 100644 --- a/src/text.C +++ b/src/text.C @@ -150,12 +150,14 @@ unsigned char LyXText::transformChar(unsigned char c, Paragraph * par, } if (Encodings::is_arabic(next_char)) { - if (Encodings::is_arabic(prev_char)) + if (Encodings::is_arabic(prev_char) && + !Encodings::is_arabic_special(prev_char)) return Encodings::TransformChar(c, Encodings::FORM_MEDIAL); else return Encodings::TransformChar(c, Encodings::FORM_INITIAL); } else { - if (Encodings::is_arabic(prev_char)) + if (Encodings::is_arabic(prev_char) && + !Encodings::is_arabic_special(prev_char)) return Encodings::TransformChar(c, Encodings::FORM_FINAL); else return Encodings::TransformChar(c, Encodings::FORM_ISOLATED); @@ -2026,7 +2028,7 @@ void LyXText::insertChar(BufferView * bview, char c) // we would not get a rebreak! row->fill(fill(bview, row, workWidth(bview))); } - + if (c == Paragraph::META_INSET || row->fill() < 0) { refresh_y = y; refresh_row = row; @@ -2392,7 +2394,8 @@ LyXText::selectNextWordToSpellcheck(BufferView * bview, float & value) const if (the_locking_inset) { WordLangTuple word = the_locking_inset->selectNextWordToSpellcheck(bview, value); if (!word.word().empty()) { - value += float(cursor.y())/float(height); + value += float(cursor.y()); + value /= float(height); return word; } // we have to go on checking so move cursor to the next char @@ -3268,7 +3271,7 @@ int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix, switch (vsp.kind()) { case VSpace::LENGTH: { - str = prefix + " (" + vsp.asLyXCommand() + ")"; + str = prefix + " (" + vsp.asLyXCommand() + ')'; // adding or removing space bool const added = !(vsp.length().len().value() < 0.0); ty1 = added ? (start + arrow_size) : start;