]> git.lyx.org Git - features.git/commitdiff
GuiSymbols: show all symbols when UseNonTeXFonts
authorGuillaume Munch <gm@lyx.org>
Sat, 3 Dec 2016 22:35:15 +0000 (23:35 +0100)
committerGuillaume Munch <gm@lyx.org>
Sat, 3 Dec 2016 22:35:15 +0000 (23:35 +0100)
src/Cursor.cpp

index 43984de9c80c78b01f2adceacbed16b06d8870fd..e2d1f893ae120d986073905fe3ef217c38b02192 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include "Buffer.h"
+#include "BufferParams.h"
 #include "BufferView.h"
 #include "CoordCache.h"
 #include "Cursor.h"
@@ -2066,10 +2067,14 @@ Encoding const * Cursor::getEncoding() const
 {
        if (empty())
                return 0;
+       BufferParams const & bp = bv().buffer().params();
+       if (bp.useNonTeXFonts)
+               return encodings.fromLyXName("utf8-plain");
+
        CursorSlice const & sl = innerTextSlice();
        Text const & text = *sl.text();
-       Font font = text.getPar(sl.pit()).getFont(
-               bv().buffer().params(), sl.pos(), text.outerFont(sl.pit()));
+       Font font = text.getPar(sl.pit()).getFont(bp, sl.pos(),
+                                                 text.outerFont(sl.pit()));
        return font.language()->encoding();
 }