FontIterator & operator++()
{
++pos_;
- if (pos_ > endspan_ || pos_ == bodypos_) {
+ if (pos_ < par_.size() && (pos_ > endspan_ || pos_ == bodypos_)) {
font_ = tm_.displayFont(pit_, pos_);
endspan_ = par_.fontSpan(pos_).last;
}
// the value of rtl.
bool const rtl_on_lastrow = lastrow ? text_->isRTL(par) : false;
- // if the first character is a separator, and we are in RTL
- // text, this character will not be painted on screen
- // and thus we should not count it and skip to the next. Only
- // in freespacing paragraphs, this first character is painted.
- if (!par.isFreeSpacing() && par.isSeparator(bidi.vis2log(vc)))
- ++vc;
-
while (vc < end && tmpx <= x) {
c = bidi.vis2log(vc);
last_tmpx = tmpx;
Inset * inset = checkInsetHit(x, yy);
//lyxerr << "inset " << inset << " hit at x: " << x << " y: " << y << endl;
if (!inset) {
- // Either we deconst editXY or better we move current_font
- // and real_current_font to Cursor
- // FIXME: what is needed now that current_font and real_current_font
- // are transferred?
cur.setCurrentFont();
return 0;
}