]> git.lyx.org Git - features.git/commitdiff
Keep cursor position when splitting
authorDaniel Ramoeller <d.lyx@web.de>
Mon, 6 Mar 2023 20:44:59 +0000 (21:44 +0100)
committerScott Kostyshak <skostysh@lyx.org>
Thu, 10 Aug 2023 10:10:08 +0000 (06:10 -0400)
Fix for #12689

src/frontends/qt/GuiView.cpp

index 844ef90d07356f8f356ed3ac4b9bedf59df157f2..c02c479d16d8f174fab7cb9565c1b24e16fd6f29 100644 (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;
                }