In FindAdv we use Qt to interpret regular expressions.
Regex uses for instance '\w', '\d' etc.
'\d' finds not just '0-9' but also e.g. '߂' (Nko Digit Two: U+07c2)
'\w' includes also such numbers.
ATM, only FindAdv uses this function.
When generating makefiles, by default qmake tries to use
relative paths if it can replace at most 4 subdirs with "../"
to reach the QTDIR from the project file location.
This maximum can be changed by defining QMAKE_PROJECT_DEPTH, and
setting it to zero forces qmake to always use absolute paths.
This is necessary because the paths for includes and libs are
generated by a temporary project file located in a temporary dir
not corresponding to the real source dir.
In this case we skip the undesired word-characters before starting the search.
There are still some inconsistencies between LyX and Qt of 'what counts as a word-character',
but too hard to resolve.
Since the element 'match_len' in class MatchResult is an integer,
the check 'if (!match(...).match_len))' is changed to
'if (match(...).match_len) <= 0)'
1.) The type of variable at_begin changes from bool to enum matchType
true -> MatchStringAdv::MatchFromStart,
false -> MatchStringAdv::MatchAnyPlace
2.) discard default parameter-values of
MatchStringAdv::operator()
MatchStringAdv::findAux()
1.) Changed arrays dept and closes to vector-type because of runtime error in UserGuide.lyx
with a big paragraph (size > 8900 chars) contained too many opening parentheses
2.) Removed one creation 'textcyrillic'-key because it is later anyway created
3.) Most important (thanks to Scott who found the failure)
Move the check if the found string really is part of MATH to
the relevant place.
Without this change the search using 'Search only in maths' will fail miserably.
Jürgen fixed the core issue at a77c84a0 so this workaround is not
needed anymore. It is more intuitive, and easier to remember, to not
use the double-quotes.
This reverts commit 67e9add6d0.
When implementing multi-row string breaking, an extra createLine()
statement, which made sense in the original code, was kept by mistake.
This basically made the mechanism ineffective, because it created one
row with the correct length, plus a second one with all the remaining
text, which would have to be itself broken. This went undetected
because the display is still correct.
Additionally, this issue polluted the break cache to the extent that
the hit rate could be 0%.
Together, these two effects created a major slowdown with a document
containing a single ~30000 characters paragraph.
Fixes bug #12534.
When toggleFree is called without a selection, the only result is to
change the cursor currentfont.
In the other cases (selection or implicit selection), we want to reset
the cursor font from the text font.
Fixes bug #12518.
To handle this case, we use '\lyxdollar' string instead.
Also try to handle '\n' in the docstring directly instead in the
string already converted to utf8.
(The utf8-version is still there, but commented out)
If the searched area contains deleted parts, there may be more closing
as opening parentheses in latex output. We have to remove them before
further processing.