commit 8da2fe921a2752fb0911c1cf53dc61ad2b589606
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Oct 8 16:57:15 2026 +0200

    Create an undo group before importing a text file
    
    (cherry picked from commit facab124dd041a0ae8a09b1b20e026723ceb5af1)
---
 src/frontends/qt/GuiView.cpp | 1 +
 status.25x                   | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 4389c4b838..ed83c83ef4 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -3202,6 +3202,7 @@ static bool import(GuiView * lv, FileName const & 
filename,
                string filename2 = (loader_format == format) ? 
filename.absFileName()
                        : support::changeExtension(filename.absFileName(),
                                          
theFormats().extension(loader_format));
+               UndoGroupHelper ugh(b);
                
lv->currentBufferView()->insertPlaintextFile(FileName(filename2),
                        as_paragraphs);
                guiApp->setCurrentView(lv);
diff --git a/status.25x b/status.25x
index 8535814c3c..74d602c7ea 100644
--- a/status.25x
+++ b/status.25x
@@ -66,6 +66,8 @@ What's new
 - Fix insertion of references to equations if the equation is not starting
   a new paragraph.
 
+- Fix undo handling when importing a plain text document.
+
 
 * INTERNALS
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to