diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-03-16 23:40:38 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-03-16 23:40:38 +0000 |
| commit | 8b1078e51029850ea4610cee75a8c81a8e5afbba (patch) | |
| tree | c2f76bfc29ba79f498d52757d05d8ed39e3c8e0b /src/normal.hh | |
| parent | e44f95820ee182460bee2e7569ab4ecb1d444112 (diff) | |
Use a HashMap to store the normal mode keymap
Diffstat (limited to 'src/normal.hh')
| -rw-r--r-- | src/normal.hh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/normal.hh b/src/normal.hh index 96cf1457..bb2d3ecc 100644 --- a/src/normal.hh +++ b/src/normal.hh @@ -1,7 +1,7 @@ #ifndef normal_hh_INCLUDED #define normal_hh_INCLUDED -#include "array_view.hh" +#include "hash_map.hh" #include "keys.hh" #include "string.hh" @@ -16,15 +16,13 @@ struct NormalParams char reg; }; -struct NormalCmdDesc +struct NormalCmd { - Key key; StringView docstring; void (*func)(Context& context, NormalParams params); }; -using KeyMap = const ArrayView<NormalCmdDesc>; -extern KeyMap keymap; +extern const HashMap<Key, NormalCmd> keymap; } |
