Mercurial > vim
diff src/digraph.c @ 29173:1ec1ba7e7728 v8.2.5106
patch 8.2.5106: default cmdwin mappings are re-mappable
Commit: https://github.com/vim/vim/commit/44068e97dbd8fc8ebd93113e436a1e37a6bff52c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Jun 16 11:14:55 2022 +0100
patch 8.2.5106: default cmdwin mappings are re-mappable
Problem: Default cmdwin mappings are re-mappable.
Solution: Make the default mappings not re-mappable. (closes https://github.com/vim/vim/issues/10580) Use
symbols for the first do_map() argument.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 16 Jun 2022 12:30:04 +0200 |
parents | d0241e74bfdb |
children | 89e1d67814a9 |
line wrap: on
line diff
--- a/src/digraph.c +++ b/src/digraph.c @@ -2567,7 +2567,7 @@ ex_loadkeymap(exarg_T *eap) vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s %s", ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from, ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].to); - (void)do_map(2, buf, MODE_LANGMAP, FALSE); + (void)do_map(MAPTYPE_NOREMAP, buf, MODE_LANGMAP, FALSE); } p_cpo = save_cpo; @@ -2598,7 +2598,7 @@ keymap_unload(void) for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) { vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s", kp[i].from); - (void)do_map(1, buf, MODE_LANGMAP, FALSE); + (void)do_map(MAPTYPE_UNMAP, buf, MODE_LANGMAP, FALSE); } keymap_clear(&curbuf->b_kmap_ga);