void XScreen::draw(LyXText * text, BufferView * bv, unsigned int y)
{
- int const old_first = text->top_y();
text->top_y(y);
// make a dumb new-draw
- drawFromTo(text, bv, 0, owner_.workHeight(), 0, 0);
- expose(0, 0, owner_.workWidth(), owner_.workHeight());
+ //drawFromTo(text, bv, 0, owner_.workHeight(), 0, 0);
+ //expose(0, 0, owner_.workWidth(), owner_.workHeight());
XSync(fl_get_display(), 0);
}
RowList::iterator end = pit->rows.end();
// remove rows of paragraph
- for ( ; rit != end; ++rit) {
+ int anchor_cnt = -1;
+ for (int i = 0; rit != end; ++rit, ++i) {
if (rit == anchor_row_)
- anchor_row_ = endRow();
+ anchor_cnt = i;
height -= rit->height();
}
pit->rows.clear();
setHeightOfRow(pit, tmprow);
}
+ if (anchor_cnt == -1) {
+ if (anchor_cnt >= pit->rows.size())
+ anchor_cnt = pit->rows.size();
+ anchor_row_ = pit->rows.begin();
+ advance(anchor_row_, anchor_cnt);
+ }
+
//lyxerr << "redoParagraph: " << pit->rows.size() << " rows\n";
}