This is actually better thean making sure that the cursor is visible.
Fixes bug #12689.
}
+void BufferView::copySettingsFrom(BufferView const & bv)
+{
+ setCursor(bv.cursor());
+ d->anchor_pit_ = bv.d->anchor_pit_;
+ d->anchor_ypos_ = bv.d->anchor_ypos_;
+}
+
+
int BufferView::defaultMargin() const
{
// The value used to be hardcoded to 10
Buffer & buffer();
Buffer const & buffer() const;
+ /// Copy cursor and vertical offset information from \c bv
+ void copySettingsFrom(BufferView const & bv);
+
///
void setFullScreen(bool full_screen) { full_screen_ = full_screen; }
TabWorkArea * twa = addTabWorkArea();
GuiWorkArea * wa = twa->addWorkArea(*doc_buffer, *this);
- wa->bufferView().setCursor(bv->cursor());
- dr.screenUpdate(Update::ForceAll | Update::FitCursor);
+ wa->bufferView().copySettingsFrom(*bv);
+ dr.screenUpdate(Update::ForceAll);
setCurrentWorkArea(wa);
break;
}