From 725a96219441136809d12202bba9c9c615efe68f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Oct 2011 16:57:13 +0200 Subject: 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) --- src/option.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/option.c') 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 -- cgit v1.2.1