commit 47adf27ac3b90ef7899f838da7cee56c72e6ea0e
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Nov 23 16:53:53 2018 +0100

    Fix undo after breaking a nested paragraph
    
    We have to take into account that Buffer::updateBuffer can modify the 
document.
    
    Fix bug #11292.
    
    (cherry picked from commit 57feb0fed0c078903900aaea069c49207c8cb9ac)
---
 src/frontends/qt4/GuiApplication.cpp |    8 +++++---
 status.23x                           |    3 +++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt4/GuiApplication.cpp 
b/src/frontends/qt4/GuiApplication.cpp
index 79f14d6..3c6e137 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -1403,11 +1403,13 @@ DispatchResult const & 
GuiApplication::dispatch(FuncRequest const & cmd)
                // This handles undo groups automagically
                UndoGroupHelper ugh(buffer);
                dispatch(cmd, dr);
+               // redraw the screen at the end (first of the two drawing 
steps).
+               // This is done unless explicitly requested otherwise.
+               // This code is kept inside the undo group because updateBuffer
+               // can create undo actions (see #11292)
+               updateCurrentView(cmd, dr);
        }
 
-       // redraw the screen at the end (first of the two drawing steps).
-       // This is done unless explicitly requested otherwise
-       updateCurrentView(cmd, dr);
        d->dispatch_result_ = dr;
        return d->dispatch_result_;
 }
diff --git a/status.23x b/status.23x
index 544bc1a..97a9a3c 100644
--- a/status.23x
+++ b/status.23x
@@ -65,6 +65,9 @@ What's new
 
 - Fix broken space dialog in mathed (bug 7747).
 
+- Fix undo in some cases involving nesting (bug 11292).
+
+
 * INTERNALS
 
 

Reply via email to