updated for version 7.3.335
Problem:    When 'imdisable' is reset from an autocommand in Insert mode it
            doesn't take effect.
Solution:   Call im_set_active() in Insert mode. (Taro Muraoka)
diff --git a/src/option.c b/src/option.c
index 977d838..f76b0f9 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7806,6 +7806,10 @@
 	/* Only de-activate it here, it will be enabled when changing mode. */
 	if (p_imdisable)
 	    im_set_active(FALSE);
+	else if (State & INSERT)
+	    /* When the option is set from an autocommand, it may need to take
+	     * effect right away. */
+	    im_set_active(curbuf->b_p_iminsert == B_IMODE_IM);
     }
 #endif
 
diff --git a/src/version.c b/src/version.c
index f63a908..15d461f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    335,
+/**/
     334,
 /**/
     333,