]> git.lyx.org Git - features.git/commitdiff
Replace selection on insert LyX Document
authorDaniel Ramoeller <d.lyx@web.de>
Tue, 16 May 2023 08:54:52 +0000 (10:54 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 30 May 2023 23:01:22 +0000 (01:01 +0200)
Fix for bug #10390

src/BufferView.cpp

index 9931c3f3dd949d510dc7017d7bc7e041283ad262..913c4598d37937ad00e8d82cc1d312a320522b6a 100644 (file)
@@ -3190,6 +3190,7 @@ void BufferView::insertLyXFile(FileName const & fname, bool const ignorelang)
                        // set main language of imported file to context language
                        buf.changeLanguage(buf.language(), d->cursor_.getFont().language());
                buffer_.undo().recordUndo(d->cursor_);
+               cap::replaceSelection(d->cursor_);
                cap::pasteParagraphList(d->cursor_, pars,
                                        buf.params().documentClassPtr(),
                                        buf.params().authors(), el);