bv_->theLockingInset(the_locking_inset);
}
bv_->text->first_y = screen_->topCursorVisible(bv_->text);
-#if 0
+ // please tell me WHY the heck you deactivated this code, whoever
+ // 'you' are (Jug 20020311)
+#if 1
buffer_->resizeInsets(bv_);
#endif
// this will scroll the screen such that the cursor becomes visible
void BufferView::Pimpl::selectionLost()
{
- hideCursor();
- toggleSelection();
- bv_->getLyXText()->clearSelection();
- showCursor();
+ if (active() && available()) {
+ hideCursor();
+ toggleSelection();
+ bv_->getLyXText()->clearSelection();
+ showCursor();
+ }
}
return;
int y = text->first_y;
- if (text->inset_owner)
- y += bv_->text->first_y;
Row * cursorrow = text->cursor.row();
+
text->setCursorFromCoordinates(bv_, bv_->text->cursor.x_fix(), y);
finishUndo();
// This is to allow jumping over large insets
bool BufferView::Pimpl::available() const
{
- if (buffer_ && bv_->text) return true;
+ if (buffer_ && bv_->text)
+ return true;
return false;
}
void BufferView::Pimpl::updateInset(Inset * inset, bool mark_dirty)
{
- if (!inset)
+ if (!inset || !available())
return;
// first check for locking insets
}
}
- // then check the current buffer
- if (available()) {
- hideCursor();
+ // then check if the inset is a top_level inset (has no owner)
+ // if yes do the update as always otherwise we have to update the
+ // toplevel inset where this inset is inside
+ Inset * tl_inset = inset;
+ while(tl_inset->owner())
+ tl_inset = tl_inset->owner();
+ hideCursor();
+ if (tl_inset == inset) {
update(bv_->text, BufferView::UPDATE);
if (bv_->text->updateInset(bv_, inset)) {
if (mark_dirty) {
}
return;
}
+ } else if (static_cast<UpdatableInset *>(tl_inset)
+ ->updateInsetInInset(bv_, inset))
+ {
+ if (bv_->text->updateInset(bv_, tl_inset)) {
+ update();
+ updateScrollbar();
+ }
}
}