diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-06-24 22:58:06 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-06-24 22:58:06 +0000 |
commit | 8c8de839325eda0bed68917d18179d2003b344d1 (patch) | |
tree | c65b80f0a627f2e77385a07a62ee4206465cbc22 /src/digraph.c | |
parent | 864207de089119377a1e1e5d411307d8eb57399e (diff) | |
download | vim-git-8c8de839325eda0bed68917d18179d2003b344d1.tar.gz |
updated for version 7.2av7.2a
Diffstat (limited to 'src/digraph.c')
-rw-r--r-- | src/digraph.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/digraph.c b/src/digraph.c index 9d04af619..b867598a6 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -2538,6 +2538,7 @@ keymap_unload() char_u buf[KMAP_MAXLEN + 10]; int i; char_u *save_cpo = p_cpo; + kmap_T *kp; if (!(curbuf->b_kmap_state & KEYMAP_LOADED)) return; @@ -2546,11 +2547,13 @@ keymap_unload() p_cpo = (char_u *)"C"; /* clear the ":lmap"s */ + kp = (kmap_T *)curbuf->b_kmap_ga.ga_data; for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) { - vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s", - ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from); + vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s", kp[i].from); (void)do_map(1, buf, LANGMAP, FALSE); + vim_free(kp[i].from); + vim_free(kp[i].to); } p_cpo = save_cpo; |