diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-06-24 16:20:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-24 16:20:13 +0200 |
commit | 12c62ddea64159f812682d6cccdb3bf0ff50d035 (patch) | |
tree | 1509ab4c675eae17e08ef479a534843b416df2fc /src/nvim/memory.c | |
parent | 823d9e0af1c5bf1b971d0e54e0454db833b4f230 (diff) | |
parent | 777faa29b3201ee4c276c121957023ef7978685d (diff) | |
download | rneovim-12c62ddea64159f812682d6cccdb3bf0ff50d035.tar.gz rneovim-12c62ddea64159f812682d6cccdb3bf0ff50d035.tar.bz2 rneovim-12c62ddea64159f812682d6cccdb3bf0ff50d035.zip |
Merge pull request #19071 from bfredl/minimap
perf(map): some optimizations when setting mappings
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r-- | src/nvim/memory.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index a615802b36..29a1191bd6 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -15,6 +15,7 @@ #include "nvim/highlight.h" #include "nvim/highlight_group.h" #include "nvim/lua/executor.h" +#include "nvim/mapping.h" #include "nvim/memfile.h" #include "nvim/memory.h" #include "nvim/message.h" @@ -689,11 +690,9 @@ void free_all_mem(void) do_cmdline_cmd("menutranslate clear"); // Clear mappings, abbreviations, breakpoints. - do_cmdline_cmd("lmapclear"); - do_cmdline_cmd("xmapclear"); - do_cmdline_cmd("mapclear"); - do_cmdline_cmd("mapclear!"); - do_cmdline_cmd("abclear"); + // NB: curbuf not used with local=false arg + map_clear_int(curbuf, MAP_ALL_MODES, false, false); + map_clear_int(curbuf, MAP_ALL_MODES, false, true); do_cmdline_cmd("breakdel *"); do_cmdline_cmd("profdel *"); do_cmdline_cmd("set keymap="); |