diff --git a/src/rowpainter.C b/src/rowpainter.C index 4f0fecfa22..7be384bfdf 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -267,6 +267,7 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont font, str += par_.getChar(pos); #else std::vector str; + str.reserve(100); str.push_back(par_.getChar(pos)); #endif if (arabic) { diff --git a/src/support/textutils.h b/src/support/textutils.h index 40521ec461..c0f3850a6c 100644 --- a/src/support/textutils.h +++ b/src/support/textutils.h @@ -50,7 +50,7 @@ bool isPrintable(lyx::char_type c) inline bool isPrintableNonspace(lyx::char_type c) { - return isPrintable(c) && c != ' '; + return (c & 127) > ' '; } /// return true if a unicode char is a digit.