The branch, 2.0.x, has been updated.

- Log -----------------------------------------------------------------

commit 36e4d210d119230129c176507ce83f443a9c7490
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Wed Apr 24 18:31:34 2013 +0200

    Fix bug #8633: change tracking: paragraph break is restored by undo
    
    A recordUndo call was missing in this case.

diff --git a/src/Text.cpp b/src/Text.cpp
index 93c7c23..ea3db71 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -1590,11 +1590,13 @@ bool Text::backspace(Cursor & cur)
                if (cur.pit() == 0)
                        return dissolveInset(cur);
 
-               Paragraph & prev_par = pars_[cur.pit() - 1];
+               Cursor prev_cur = cur;
+               --prev_cur.pit();
 
-               if 
(!prev_par.isMergedOnEndOfParDeletion(cur.buffer()->params().trackChanges)) {
-                       prev_par.setChange(prev_par.size(), 
Change(Change::DELETED));
-                       setCursorIntern(cur, cur.pit() - 1, prev_par.size());
+               if 
(!prev_cur.paragraph().isMergedOnEndOfParDeletion(cur.buffer()->params().trackChanges))
 {
+                       cur.recordUndo(ATOMIC_UNDO, prev_cur.pit(), 
prev_cur.pit());
+                       prev_cur.paragraph().setChange(prev_cur.lastpos(), 
Change(Change::DELETED));
+                       setCursorIntern(cur, prev_cur.pit(), 
prev_cur.lastpos());
                        return true;
                }
                // The cursor is at the beginning of a paragraph, so
diff --git a/status.20x b/status.20x
index d35946a..a5c8e92 100644
--- a/status.20x
+++ b/status.20x
@@ -137,6 +137,9 @@ What's new
 
 - Fix a few selection bugs in tabular (bugs 4981, 7988).
 
+- Handle properly undo after deleting a paragraph break when change
+  tracking is enabled (bug 8633).
+
 - Fix `select whole inset' function in math editor.
 
 - Fix confusing behavior in search when changing directions (bug 8543)

-----------------------------------------------------------------------

Summary of changes:
 src/Text.cpp |   10 ++++++----
 status.20x   |    3 +++
 2 files changed, 9 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to