{
if (empty())
return 0;
- int s = 0;
- // go up until first non-0 text is hit
- // (innermost text is 0 in mathed)
- for (s = depth() - 1; s >= 0; --s)
- if (operator[](s).text())
- break;
- CursorSlice const & sl = operator[](s);
+ CursorSlice const & sl = innerTextSlice();
Text const & text = *sl.text();
Font font = text.getPar(sl.pit()).getFont(
bv().buffer().params(), sl.pos(), outerFont(sl.pit(), text.paragraphs()));
// if a character is entered.
// HACK. far from being perfect...
- // go up until first non-0 text is hit
- // (innermost text is 0 in mathed)
- int s = 0;
- for (s = depth() - 1; s >= 0; --s)
- if (operator[](s).text())
- break;
- CursorSlice const & sl = operator[](s);
+
+ CursorSlice const & sl = innerTextSlice();
Text const & text = *sl.text();
Paragraph const & par = text.getPar(sl.pit());