This is a follow-up to 758de957.
- unify the metrics and drawing of \sqrt and \root using helper
functions mathed_root_metrics and mathed_draw_root.
- compute the vertical spacing above the nucleus of the root following
rule 11 of the TeXbook. In particular, it is different in inline and
display style.
- draw the root glyph without hard-coded pixel values. Make the line
width depend on the zoom.
more work is needed to implement properly rule 11:
- Ideally, we should use sqrt glyphs from the math fonts. Note that
then we would get rule thickness from there.
- The positioning of the root MathData is arbitrary. It should
follow the definition of \root...\of... in The Texbook in
Apprendix B page 360.
Fixes bug #10814.
It may happen that the buffers are visited in order buffer1,
buffer2, buffer1. In this case, we want to have only one undo group
in buffer1. The solution is to replace buffer_ with a set<Buffer*>.
A use case among others is InsetLabel::updateReferences.
The bug is the following: when selecting several paragraphs quickly
enough, some rows do not get selected.This is a consequence of the
removal of row crc, which lead to not taking into account the
selection status of the row in the decision to repaint.
The solution chosen here is to add a Row::change() helper function to
modify row members. This will set the Row changed status whenever the
value of the member changes.
Since they are not supposed to contain versioned strings like LYX_DIR_VER,
it is sufficient to copy them instead.
Besides, they also may be non-utf-8 coded, which would also break the conversion.
The correct behavior is to go to position 0 going up from first row,
and to end of row when going down on last row.
The targetx value of the cursor is not updated, which makes cursor
movement more natural.
Fixes bug #10701.
When the caret is at end of row, if may happen that it is drawn after
the end of the row. In this case caret blinking will not work
properly. This patch extends the row background on the left and right
by Inset::TEXT_TO_INSET_OFFSET. This is only a hack that will not work
if the caret has a ridiculous width like 6.
Additionally, introduce some (disabled) debug code that numbers the
rows on screen by painting order.
Finally, make the code that detects whether the caret was in a given
row more precise (take boundary into account).
Fixes (mostly, see above) bug #10797.