From: Guillaume Munch Date: Sat, 3 Dec 2016 22:35:15 +0000 (+0100) Subject: GuiSymbols: fix char->block lookup X-Git-Tag: 2.3.0alpha1~669 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a19be0314b3ed7be39088a6ae571fed1785f516b;p=lyx.git GuiSymbols: fix char->block lookup --- diff --git a/src/frontends/qt4/GuiSymbols.cpp b/src/frontends/qt4/GuiSymbols.cpp index cdfedee4e7..4b314e8379 100644 --- a/src/frontends/qt4/GuiSymbols.cpp +++ b/src/frontends/qt4/GuiSymbols.cpp @@ -177,10 +177,10 @@ QString getBlock(char_type c) int i = 0; while (i < no_blocks && c > unicode_blocks[i].end) ++i; - if (i == no_blocks) + if (i == no_blocks || c < unicode_blocks[i].start) return QString(); + // cache the last block for guessing next time lastBlock = i; - //LYXERR0("fail: " << int(c) << ' ' << lastBlock); return unicode_blocks[lastBlock].qname; }