]> git.lyx.org Git - features.git/commitdiff
* Paragraph.cpp (latexSurrogatePair):
authorJürgen Spitzmüller <spitz@lyx.org>
Sat, 21 Jun 2008 07:12:56 +0000 (07:12 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sat, 21 Jun 2008 07:12:56 +0000 (07:12 +0000)
- do not use braces for combinated characters that are natively output (as unicode glyphs)
  (fixes part of bug 4946)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25347 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp

index eb966b8029cc7e616f0c180f9ee52e28508e9c57..6522bbfe72095bb71172cf7c1109e7b5873fac1e 100644 (file)
@@ -499,7 +499,12 @@ int Paragraph::Private::latexSurrogatePair(odocstream & os, char_type c,
        // Is this correct WRT change tracking?
        docstring const latex1 = encoding.latexChar(next);
        docstring const latex2 = encoding.latexChar(c);
-       os << latex1 << '{' << latex2 << '}';
+       if (docstring(1, next) == latex1) {
+               // the encoding supports the combination
+               os << latex2 << latex1;
+               return latex1.length() + latex2.length();
+       } else
+               os << latex1 << '{' << latex2 << '}';
        return latex1.length() + latex2.length() + 2;
 }