diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 3e515d3..d87bb50 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4275,6 +4275,7 @@ gtk_text_view_move_visually
 gtk_text_view_new
 gtk_text_view_new_with_buffer
 gtk_text_view_place_cursor_onscreen
+gtk_text_view_reset_im_context
 gtk_text_view_scroll_mark_onscreen
 gtk_text_view_scroll_to_iter
 gtk_text_view_scroll_to_mark
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 80d356d..592fb19 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -296,7 +296,6 @@ static void     gtk_text_view_set_attributes_from_style (GtkTextView        *tex
 static void     gtk_text_view_ensure_layout          (GtkTextView        *text_view);
 static void     gtk_text_view_destroy_layout         (GtkTextView        *text_view);
 static void     gtk_text_view_check_keymap_direction (GtkTextView        *text_view);
-static void     gtk_text_view_reset_im_context       (GtkTextView        *text_view);
 static void     gtk_text_view_start_selection_drag   (GtkTextView        *text_view,
                                                       const GtkTextIter  *iter,
                                                       GdkEventButton     *event);
@@ -6552,9 +6551,22 @@ gtk_text_view_destroy_layout (GtkTextView *text_view)
     }
 }
 
-static void
+/**
+ * gtk_text_view_reset_im_context:
+ * @text_view: a #GtkTextView
+ *
+ * Reset the input method context of the text view if needed.
+ *
+ * This can be necessary in the case where modifying the buffer
+ * would confuse on-going input method behavior.
+ *
+ * Since: 2.20
+ **/
+void
 gtk_text_view_reset_im_context (GtkTextView *text_view)
 {
+  g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
+
   if (text_view->need_im_reset)
     {
       text_view->need_im_reset = FALSE;
diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h
index 2dfe23f..32e9f94 100644
--- a/gtk/gtktextview.h
+++ b/gtk/gtktextview.h
@@ -303,6 +303,7 @@ gboolean gtk_text_view_starts_display_line            (GtkTextView       *text_v
 gboolean gtk_text_view_move_visually                  (GtkTextView       *text_view,
                                                        GtkTextIter       *iter,
                                                        gint               count);
+void gtk_text_view_reset_im_context                   (GtkTextView       *text_view);
 
 /* Adding child widgets */
 void gtk_text_view_add_child_at_anchor (GtkTextView          *text_view,
