Keep cursor position when splitting

Fix for #12689
This commit is contained in:
Daniel Ramoeller 2023-03-06 21:44:59 +01:00 committed by Scott Kostyshak
parent a3849e8bbe
commit a2310d04f4

View File

@ -4880,6 +4880,8 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
? Qt::Vertical : Qt::Horizontal);
TabWorkArea * twa = addTabWorkArea();
GuiWorkArea * wa = twa->addWorkArea(*doc_buffer, *this);
DocIterator cur = bv->cursor();
wa->bufferView().moveToPosition(cur.pit(), cur.pos(), 0, 0);
setCurrentWorkArea(wa);
break;
}