commit 3a73b822a57b9d5f990b0356c4bf29bbd1d31a87
Author: Guillaume Munch <[email protected]>
Date: Sat Dec 3 23:35:15 2016 +0100
GuiSymbols: show all symbols when UseNonTeXFonts
---
src/Cursor.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index 43984de..e2d1f89 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -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();
}