commit bbeb3773a1dbfdc2a43243c949f6da3396bfe8a1
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed Aug 24 15:29:17 2016 +0200

    Do not set layout for no-op paragraph break
    
    When breaking paragraph in an empty top-level paragraph, nothing
    happens on screen but yet there is an undo step because the layout is
    reset to what it already was.
    
    Avoid this case.
    
    Fixes bug #10089.
    (cherry picked from commit 2ad52918da1d0f375bf2831df4c51f6afa7ea448)
---
 src/Text.cpp |    3 ++-
 status.22x   |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index a47d4b1..a6176bc 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -769,7 +769,8 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
                else {
                        docstring const & lay = cur.paragraph().usePlainLayout()
                            ? tclass.plainLayoutName() : 
tclass.defaultLayoutName();
-                       setLayout(cur, lay);
+                       if (lay != layout.name())
+                               setLayout(cur, lay);
                }
                return;
        }
diff --git a/status.22x b/status.22x
index f4bc1bc..1ad21c3 100644
--- a/status.22x
+++ b/status.22x
@@ -106,6 +106,8 @@ What's new
 
 - Fix the minimum size of the citation dialog on first time (bug 10019).
 
+- When Enter does nothing (empty paragraph), do not record undo (bug 10089).
+
 
 * INTERNALS
 

Reply via email to