commit a2310d04f47ba6aadea0e43ffc1e8a8579110022
Author: Daniel Ramoeller <[email protected]>
Date: Mon Mar 6 21:44:59 2023 +0100
Keep cursor position when splitting
Fix for #12689
---
src/frontends/qt/GuiView.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 844ef90..c02c479 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -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;
}
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs