diff -urN gtksourceview-1.0.1-orig/gtksourceview/gtksourceview.c gtksourceview-1.0.1/gtksourceview/gtksourceview.c
--- gtksourceview-1.0.1-orig/gtksourceview/gtksourceview.c	2004-12-23 06:22:10.571347032 +0900
+++ gtksourceview-1.0.1/gtksourceview/gtksourceview.c	2004-12-23 06:23:59.664762312 +0900
@@ -95,6 +95,7 @@
 
 	GtkSourceBuffer *source_buffer;
 	gint		 old_lines;
+	gboolean	imflag;
 };
 
 /* Implement DnD for application/x-color drops */
@@ -426,6 +427,31 @@
 }
 
 static void
+im_commit_cb (GtkIMContext *im_context, gchar *arg, gpointer data)
+{
+	GtkSourceView *view = GTK_SOURCE_VIEW (data);
+	view->priv->imflag = FALSE;
+}
+
+static void
+im_preedit_changed_cb (GtkIMContext *im_context, gpointer data)
+{
+	GtkSourceView *view = GTK_SOURCE_VIEW (data);
+	if (!view->priv->imflag)
+		view->priv->imflag = TRUE;
+	else {
+		gchar *str;
+		gint pos;
+		gtk_im_context_get_preedit_string (im_context, &str, NULL, &pos);
+		if (str && str[0] == '\0') {
+			view->priv->imflag = FALSE;
+		}
+		if (str)
+			g_free (str);
+	}
+}
+
+static void
 gtk_source_view_init (GtkSourceView *view)
 {
 	GtkTargetList *tl;
@@ -441,6 +467,8 @@
 							  (GDestroyNotify) g_free,
 							  (GDestroyNotify) g_object_unref);
 
+	view->priv->imflag = FALSE;
+
 	gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 2);
 	gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 2);
 
@@ -458,6 +486,16 @@
 			  "drag_data_received", 
 			  G_CALLBACK (view_dnd_drop), 
 			  NULL);
+
+	g_signal_connect (GTK_TEXT_VIEW (view)->im_context,
+	                  "commit", 
+	                  G_CALLBACK (im_commit_cb), 
+	                  G_OBJECT (view));
+
+	g_signal_connect (GTK_TEXT_VIEW (view)->im_context,
+	                  "preedit_changed", 
+	                  G_CALLBACK (im_preedit_changed_cb), 
+	                  G_OBJECT (view));
 }
 
 static void
@@ -1710,6 +1748,22 @@
 
 		if (indent != NULL)
 		{
+			gchar *str;
+			gint pos;
+
+			gtk_im_context_get_preedit_string (GTK_TEXT_VIEW (widget)->im_context, 
+			                                   &str, 
+			                                   NULL, 
+			                                   &pos);
+
+			if (str && str[0] != '\0' && view->priv->imflag)
+			{
+				g_free (str);
+				return FALSE;
+			}
+			if (str)
+				g_free (str);
+
 			/* Insert new line and auto-indent. */
 			gtk_text_buffer_begin_user_action (buf);
 			gtk_text_buffer_insert (buf, &cur, "\n", 1);
