# Finding special latex/regexp chars: (
#
Lang it_IT.utf8
+KD: 100
CO: findadv-re-01.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-01.loga.txt 2>&1
CN: Part 1
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
+KK: \CF
KK: \Axregexp-mode\[Return]\\(\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
+KK: \CF
KK: \Axregexp-mode\[Return]\\[\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1
TestEnd
// + allow to search for colored text too
while (regex_replace(t, t, REGEX_BOS "\\\\(((footnotesize|tiny|scriptsize|small|large|Large|LARGE|huge|Huge|emph|noun|minisec|text(bf|md|sl|sf|it|tt))|((textcolor|foreignlanguage|latexenvironment)\\{[a-z]+\\*?\\})|(u|uu)line|(s|x)out|uwave)|((sub)?(((sub)?section)|paragraph)|part|chapter)\\*?)\\{", "")
|| regex_replace(t, t, REGEX_BOS "\\$", "")
- || regex_replace(t, t, REGEX_BOS "\\\\\\[ ", "")
+ || regex_replace(t, t, REGEX_BOS "\\\\\\[", "")
|| regex_replace(t, t, REGEX_BOS " ?\\\\item\\{[a-z]+\\}", "")
|| regex_replace(t, t, REGEX_BOS "\\\\begin\\{[a-zA-Z_]*\\*?\\} ", ""))
;
LYXERR(Debug::FIND, "identifyClosing(): t now is '" << t << "'");
if (regex_replace(t, t, "(.*[^\\\\])\\$" REGEX_EOS, "$1"))
continue;
- if (regex_replace(t, t, "(.*[^\\\\]) \\\\\\]" REGEX_EOS, "$1"))
+ if (regex_replace(t, t, "(.*[^\\\\])\\\\\\]" REGEX_EOS, "$1"))
continue;
if (regex_replace(t, t, "(.*[^\\\\]) \\\\end\\{[a-zA-Z_]*\\*?\\}" REGEX_EOS, "$1"))
continue;
bool ws_left = (cur.pos() > 0)
? par.isWordSeparator(cur.pos() - 1)
: true;
- bool ws_right = (cur.pos() + len < par.size())
+ bool ws_right;
+ if (len < 0)
+ ws_right = true;
+ else {
+ ws_right = (cur.pos() + len < par.size())
? par.isWordSeparator(cur.pos() + len)
: true;
+ }
LYXERR(Debug::FIND,
"cur.pos()=" << cur.pos() << ", res=" << res
<< ", separ: " << ws_left << ", " << ws_right