Fix for bug #301015 [gtkhtml]

Rohini <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Hi
Attached fix for Bug 301015 – Crash on ctrl-shift-D then ctrl-shift-left
when composing email

Please Review.

Thanks,
Rohini

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
bug301015.diff (text/x-patch, 1.4 KB)
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.613
diff -u -p -r1.613 gtkhtml.c
--- gtkhtml.c	6 Feb 2006 09:59:36 -0000	1.613
+++ gtkhtml.c	21 Feb 2006 05:52:31 -0000
@@ -4684,8 +4684,10 @@ command (GtkHTML *html, GtkHTMLCommandTy
 	case GTK_HTML_COMMAND_MODIFY_SELECTION_PAGEDOWN:
 	case GTK_HTML_COMMAND_MODIFY_SELECTION_PREV_WORD:
 	case GTK_HTML_COMMAND_MODIFY_SELECTION_NEXT_WORD:
-		if (html->engine->caret_mode || html_engine_get_editable(e))
+		if (html->engine->caret_mode || html_engine_get_editable(e)) {
+			gtk_im_context_reset (html->priv->im_context);
 			rv = move_selection (html, com_type);
+		}
 		break;
 	case GTK_HTML_COMMAND_EDITABLE_ON:
 		gtk_html_set_editable (html, TRUE);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2163
diff -u -p -r1.2163 ChangeLog
--- ChangeLog	15 Feb 2006 15:09:07 -0000	1.2163
+++ ChangeLog	21 Feb 2006 05:55:05 -0000
@@ -1,3 +1,9 @@
+2006-02-21  Rohini S  <[email protected]>
+
+	* gtkhtml.c (command): Resets IMContext before selection.
+
+	Fixes bug #301015
+
 2006-02-15  Rohini S  <[email protected]>
 
 	* htmlsearch.c (html_search_new): Function modified to include offset zero too.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.