[LyX/master] Keep cursor position when splitting
Scott Kostyshak
skostysh at lyx.org
Thu Aug 10 09:04:59 UTC 2023
commit a2310d04f47ba6aadea0e43ffc1e8a8579110022
Author: Daniel Ramoeller <d.lyx at web.de>
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;
}
More information about the lyx-cvs
mailing list