commit b3d4271e78b02ecc59dd4bd7924e9ea6065f9d68
Author: Kornel Benko <kor...@lyx.org>
Date:   Tue Dec 15 18:08:02 2020 +0100

    Adv-Find: Try to use some more unicode chars (instead of latex macros)
---
 src/Paragraph.cpp |    2 +-
 src/lyxfind.cpp   |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index bd16ca4..6373b2c 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -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') {
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index cda82db..20e1104 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -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",
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to