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.
Using the new inline statements
find_effective(), find_with_non_output(), find_with_deleted(),
find_set_feature(), find_add_feature() and find_clean_features()
makes the code a slightly better readable.
This lfun (like several others) does not work with multicell
selection. Disable the lfun in this this case for now, until a nice
solution is found.
Fixes bug #12530.
Also fix a thinko in interpreting the found values.
The match_len describes the length of the second regex field,
while matchend is the length of the search field 0.
This happens when the cursor goes into a deeper inset, since
selectWord() was called on the wrong Text object.
Additionally, fix the new word selection when cursor goes before
existing selection.
Fixes bug #12529.
DocBook comes in another commit, as the modifications are not required to keep the code compilable.
A semicolon is no more used between an index term and the places it appears, because some languages need a space before it and others not: this wasn't handled at all. With a dash, this problem disappears.