Adv-Find: Try to use some more unicode chars (instead of latex macros)

This commit is contained in:
Kornel Benko 2020-12-15 18:08:02 +01:00
parent 3950f05497
commit b3d4271e78
2 changed files with 4 additions and 6 deletions

View File

@ -1129,7 +1129,7 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
{
char_type const c = owner_->getUChar(bparams, runparams, i);
if (style.pass_thru || runparams.pass_thru
if (style.pass_thru || runparams.pass_thru || runparams.for_search
|| contains(style.pass_thru_chars, c)
|| contains(runparams.pass_thru_chars, c)) {
if (c != '\0') {

View File

@ -944,9 +944,9 @@ static docstring stringifySearchBuffer(Buffer & buffer, FindAndReplaceOptions co
AS_STR_INSETS | AS_STR_SKIPDELETE | AS_STR_PLAINTEXT,
&runparams);
}
// Even in ignore-format we have to remove "\text{}" parts
// Even in ignore-format we have to remove "\text{}, \lyxmathsym{}" parts
string t = to_utf8(str);
while (regex_replace(t, t, "\\\\text\\{([^\\}]*)\\}", "$1"));
while (regex_replace(t, t, "\\\\(text|lyxmathsym)\\{([^\\}]*)\\}", "$2"));
str = from_utf8(t);
}
return str;
@ -1320,8 +1320,6 @@ static void buildAccentsMap()
accents["negmedspace"] = u8"\uf0005";
accents["thickspace"] = u8"\uf0006";
accents["negthickspace"] = u8"\uf0007";
accents["lyxmathsym{ß}"] = "ß";
accents["text{ß}"] = "ß";
accents["ddot{\\imath}"] = "ï";
buildaccent("ddot", "aAeEhHiIioOtuUwWxXyY",
"äÄëËḧḦïÏïöÖẗüÜẅẄẍẌÿŸ"); // umlaut
@ -1358,7 +1356,7 @@ static void buildAccentsMap()
buildaccent("ogonek|k", "AaEeIiUuOo",
"ĄąĘęĮįŲųǪǫ"); // ogonek
buildaccent("cedilla|c", "CcGgKkLlNnRrSsTtEeDdHh",
"ÇçĢĢĶķĻļŅņŖŗŞşŢţȨȩḐḑḨḩ"); // cedilla
"ÇçĢģĶķĻļŅņŖŗŞşŢţȨȩḐḑḨḩ"); // cedilla
buildaccent("subring|textsubring", "Aa",
"Ḁḁ"); // subring
buildaccent("subhat|textsubcircum", "DdEeLlNnTtUu",