commit 54cffc8b1daa6bed137aac4427d6c5bb76c86345
parent 28b02eb371d5cfb914e305ba1362db3bf91ba6c1
Author: Salvatore De Paolis <iwkse@claws-mail.org>
Date: Fri, 4 Apr 2008 17:26:35 +0000
2008-04-04 [iwkse] 3.3.1cvs54
* src/undo.c
undo should works properly again
Diffstat:
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-04 [iwkse] 3.3.1cvs54
+
+ * src/undo.c
+ undo should works properly again
+
2008-04-04 [iwkse] 3.3.1cvs53
* src/undo.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3288,3 +3288,4 @@
( cvs diff -u -r 1.59.2.65 -r 1.59.2.66 src/prefs_filtering.c; ) > 3.3.1cvs51.patchset
( cvs diff -u -r 1.59.2.66 -r 1.59.2.67 src/prefs_filtering.c; ) > 3.3.1cvs52.patchset
( cvs diff -u -r 1.13.2.14 -r 1.13.2.15 src/undo.c; ) > 3.3.1cvs53.patchset
+( cvs diff -u -r 1.13.2.15 -r 1.13.2.16 src/undo.c; ) > 3.3.1cvs54.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=3
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=53
+EXTRA_VERSION=54
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/undo.c b/src/undo.c
@@ -386,14 +386,15 @@ void undo_undo(UndoMain *undostruct)
/* "pull" another data structure from the list */
if (undostruct->undo){
undoinfo = (UndoInfo *)undostruct->undo->data;
+ undostruct->undo = g_list_prepend(undostruct->undo, undoinfo);
+ undostruct->redo = g_list_remove(undostruct->redo, undoinfo);
g_return_if_fail(undoinfo != NULL);
g_return_if_fail(undoinfo->action == UNDO_ACTION_REPLACE_DELETE);
gtk_text_buffer_insert(buffer, &start_iter, undoinfo->text, -1);
}
break;
case UNDO_ACTION_REPLACE_DELETE:
- gtk_text_buffer_get_iter_at_offset(buffer, &iter, undoinfo->start_pos);
- gtk_text_buffer_insert(buffer, &iter, undoinfo->text, -1);
+ g_warning("This should not happen. UNDO_REPLACE_DELETE");
break;
default:
g_assert_not_reached();
@@ -475,6 +476,7 @@ void undo_redo(UndoMain *undostruct)
gtk_text_buffer_insert(buffer, &start_iter, redoinfo->text, -1);
break;
case UNDO_ACTION_REPLACE_INSERT:
+ /* This is needed only if we redo from a middle-click button */
gtk_text_buffer_get_iter_at_offset(buffer, &iter, redoinfo->start_pos);
gtk_text_buffer_insert(buffer, &iter, redoinfo->text, -1);
break;