summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-10-12 16:57:13 +0200
committerBram Moolenaar <Bram@vim.org>2011-10-12 16:57:13 +0200
commit725a96219441136809d12202bba9c9c615efe68f (patch)
treed7298609428e3d243cb1e15a5052a95a7b2ef60d /src/option.c
parent08c51aabc43e1617d75fa08ac8865410992feda3 (diff)
downloadvim-git-725a96219441136809d12202bba9c9c615efe68f.tar.gz
updated for version 7.3.335v7.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)
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 977d83802..f76b0f9ee 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7806,6 +7806,10 @@ set_bool_option(opt_idx, varp, value, opt_flags)
/* 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