Fixes this bug: When setting 'keymap' twice the b:keymap_name variable isn't set. (Milan Berta, 2007 Mar 9) Has something to do with 'iminsert'. Created by Martin Toft during Google Summer of Code 2007. *** src/digraph.c.orig Thu Jul 5 22:09:38 2007 --- src/digraph.c Thu Jul 5 22:10:07 2007 *************** *** 2351,2356 **** --- 2351,2360 ---- { /* Stop any active keymap and clear the table. */ keymap_unload(); + /* Remove internal variable b:keymap_name. This cannot be done in + * keymap_unload(), as keymap_unload() is also called by + * ex_loadkeymap(). */ + do_cmdline_cmd((char_u *)"unlet! b:keymap_name"); } else { *************** *** 2500,2506 **** ga_clear(&curbuf->b_kmap_ga); curbuf->b_kmap_state &= ~KEYMAP_LOADED; - do_cmdline_cmd((char_u *)"unlet! b:keymap_name"); #ifdef FEAT_WINDOWS status_redraw_curbuf(); #endif --- 2504,2509 ----