mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
FindAdv: Partly revert 02c7dbb8
. Handle the space in Paragraph.cpp instead.
This commit is contained in:
parent
02c7dbb824
commit
9f30de3c5d
@ -1213,22 +1213,31 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
|
||||
|| contains(style.pass_thru_chars, c)
|
||||
|| contains(runparams.pass_thru_chars, c)) {
|
||||
if (runparams.for_search != OutputParams::NoSearch) {
|
||||
if (c == '\\')
|
||||
switch (c) {
|
||||
case '\\':
|
||||
os << "\\\\";
|
||||
else if (c == '{')
|
||||
return;
|
||||
case '{':
|
||||
os << "\\braceleft ";
|
||||
else if (c == '}')
|
||||
return;
|
||||
case '}':
|
||||
os << "\\braceright ";
|
||||
else if (c != '\0')
|
||||
return;
|
||||
case ' ':
|
||||
case '\0':
|
||||
break;
|
||||
default:
|
||||
os.put(c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (c != '\0') {
|
||||
Encoding const * const enc = runparams.encoding;
|
||||
if (enc && !enc->encodable(c))
|
||||
throw EncodingException(c);
|
||||
os.put(c);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// TIPA uses its own T3 encoding
|
||||
|
@ -3138,28 +3138,6 @@ int LatexInfo::dispatch(ostringstream &os, int previousStart, KeyInfo &actual)
|
||||
if (count > 0)
|
||||
interval_.addIntervall(blk, blk+count);
|
||||
}
|
||||
bool blank_found = false;
|
||||
// Removing invalid space between
|
||||
// "item{description}[{...}]"
|
||||
// and
|
||||
// "\foreignlanguage{..}"
|
||||
if (interval_.par[posdown+1] == ' ') {
|
||||
if (posdown == interval_.par.size() -2)
|
||||
blank_found = true;
|
||||
else if (nextKeyIdx > 0) {
|
||||
for (int i = nextKeyIdx; i < int(entries_.size()); i++) {
|
||||
if (entries_[i]._tokenstart <= posdown)
|
||||
continue;
|
||||
if ((entries_[i].keytype == KeyInfo::isMain)
|
||||
&& (entries_[i]._tokenstart == posdown +2)) {
|
||||
blank_found = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (blank_found)
|
||||
interval_.addIntervall(posdown+1, posdown+2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user