mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Fix ERT blanks doubling bug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21214 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
74d22c2ce4
commit
4018d432de
@ -101,7 +101,7 @@ public:
|
|||||||
/// Output a space in appropriate formatting (or a surrogate pair
|
/// Output a space in appropriate formatting (or a surrogate pair
|
||||||
/// if the next character is a combining character).
|
/// if the next character is a combining character).
|
||||||
/// \return whether a surrogate pair was output.
|
/// \return whether a surrogate pair was output.
|
||||||
bool simpleTeXBlanks(Encoding const &,
|
bool simpleTeXBlanks(OutputParams const &,
|
||||||
odocstream &, TexRow & texrow,
|
odocstream &, TexRow & texrow,
|
||||||
pos_type i,
|
pos_type i,
|
||||||
unsigned int & column,
|
unsigned int & column,
|
||||||
@ -522,19 +522,20 @@ int Paragraph::Private::latexSurrogatePair(odocstream & os, char_type c,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Paragraph::Private::simpleTeXBlanks(Encoding const & encoding,
|
bool Paragraph::Private::simpleTeXBlanks(OutputParams const & runparams,
|
||||||
odocstream & os, TexRow & texrow,
|
odocstream & os, TexRow & texrow,
|
||||||
pos_type i,
|
pos_type i,
|
||||||
unsigned int & column,
|
unsigned int & column,
|
||||||
Font const & font,
|
Font const & font,
|
||||||
Layout const & style)
|
Layout const & style)
|
||||||
{
|
{
|
||||||
if (style.pass_thru)
|
if (style.pass_thru || runparams.verbatim)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (i + 1 < int(text_.size())) {
|
if (i + 1 < int(text_.size())) {
|
||||||
char_type next = text_[i + 1];
|
char_type next = text_[i + 1];
|
||||||
if (Encodings::isCombiningChar(next)) {
|
if (Encodings::isCombiningChar(next)) {
|
||||||
|
Encoding const & encoding = *(runparams.encoding);
|
||||||
// This space has an accent, so we must always output it.
|
// This space has an accent, so we must always output it.
|
||||||
column += latexSurrogatePair(os, ' ', next, encoding) - 1;
|
column += latexSurrogatePair(os, ' ', next, encoding) - 1;
|
||||||
return true;
|
return true;
|
||||||
@ -1991,7 +1992,7 @@ bool Paragraph::latex(Buffer const & buf,
|
|||||||
// style->pass_thru is false.
|
// style->pass_thru is false.
|
||||||
if (i != body_pos - 1) {
|
if (i != body_pos - 1) {
|
||||||
if (d->simpleTeXBlanks(
|
if (d->simpleTeXBlanks(
|
||||||
*(runparams.encoding), os, texrow,
|
runparams, os, texrow,
|
||||||
i, column, font, *style)) {
|
i, column, font, *style)) {
|
||||||
// A surrogate pair was output. We
|
// A surrogate pair was output. We
|
||||||
// must not call latexSpecialChar
|
// must not call latexSpecialChar
|
||||||
|
Loading…
Reference in New Issue
Block a user