changeset 3129:dc3f90a73fb3 v7.3.335

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)
author Bram Moolenaar <bram@vim.org>
date Wed, 12 Oct 2011 16:57:13 +0200
parents 8b9591ccbb68
children 91b43bbb3701
files src/option.c src/version.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -7806,6 +7806,10 @@ set_bool_option(opt_idx, varp, value, op
 	/* 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
 
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    335,
+/**/
     334,
 /**/
     333,