- has_caret |= hasCaret(bv);
- if (has_caret)
- bv->setCaretAscentDescent(min(dim.asc, fm.maxAscent()),
- min(dim.des, fm.maxDescent()));
-
- // Cache the dimension.
+ mrow.caret_dim.asc = min(dim.asc, fm.maxAscent());
+ mrow.caret_dim.des = min(dim.des, fm.maxDescent());
+ mrow.caret_dim.wid = fm.lineWidth();
+
+ /// do the same for math cells linearized in the row
+ MathRow caret_row = MathRow(mrow.caret_dim);
+ for (auto const & e : mrow)
+ if (e.type == MathRow::BEGIN && e.ar)
+ bv->setMathRow(e.ar, caret_row);
+
+ // Cache row and dimension.
+ bv->setMathRow(this, mrow);