commit da79a1b549dbc456250cbb461641ca1a06c61c40
Author: Johnny Jacob <jjohnny@novell.com>
Date:   Tue Jan 22 18:25:43 2008 +0530

    Fix for #371011 – crash in undo_or_redo in gtkhtml

diff --git a/composer/ChangeLog b/composer/ChangeLog
index 17722b7..95cdb62 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-22  Johnny Jacob  <jjohnny@novell.com>
+
+	** Fix for bug #371011
+	
+	* e-msg-composer.c (e_msg_composer_show_sig_file): Insert a new 
+	paragraph for signature.
+
 2008-01-21  Johnny Jacob  <jjohnny@novell.com>
 
 	* e-msg-composer.c (e_msg_composer_get_raw_message_text): Return
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index af09a37..16222e3 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -5415,16 +5415,14 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
 		GNOME_GtkHTML_Editor_Engine_freeze (p->eeditor_engine, &ev);
 		GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-position-save", &ev);
 		GNOME_GtkHTML_Editor_Engine_undoBegin (p->eeditor_engine, "Set signature", "Reset signature", &ev);
-
 		delete_old_signature (composer);
 		html = get_signature_html (composer);
 		if (html) {
 			GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "insert-paragraph", &ev);
-			if (!GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-backward", &ev))
-				GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "insert-paragraph", &ev);
-			else
-				GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-forward", &ev);
-		/* printf ("insert %s\n", html); */
+			GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-backward", &ev);
+			GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "insert-paragraph", &ev);
+
+			/* printf ("insert %s\n", html); */
 			GNOME_GtkHTML_Editor_Engine_setParagraphData (p->eeditor_engine, "orig", "0", &ev);
 			GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "indent-zero", &ev);
 			GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "style-normal", &ev);
