[LyX/master] Replace selection on insert LyX Document

Jean-Marc Lasgouttes lasgouttes at lyx.org
Tue May 30 21:53:44 UTC 2023


commit 5a893d986262be405b0e0bb5e827e011dc690512
Author: Daniel Ramoeller <d.lyx at web.de>
Date:   Tue May 16 10:54:52 2023 +0200

    Replace selection on insert LyX Document
    
    Fix for bug #10390
---
 src/BufferView.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 9931c3f..913c459 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -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);


More information about the lyx-cvs mailing list