diff --git a/src/normal.cc b/src/normal.cc index 7a6cc6dd4..bfdfcf654 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1350,7 +1350,7 @@ void move(Context& context, NormalParams params) selections.sort_and_merge_overlapping(); } -KeyMap keymap = +static NormalCmdDesc cmds[] = { { 'h', "move left", move }, { 'j', "move down", move }, @@ -1515,4 +1515,6 @@ KeyMap keymap = { Key::PageDown, "scroll one page down", scroll }, }; +KeyMap keymap = cmds; + } diff --git a/src/normal.hh b/src/normal.hh index 4a4534157..96cf1457d 100644 --- a/src/normal.hh +++ b/src/normal.hh @@ -1,8 +1,8 @@ #ifndef normal_hh_INCLUDED #define normal_hh_INCLUDED +#include "array_view.hh" #include "keys.hh" -#include "unordered_map.hh" #include "string.hh" namespace Kakoune @@ -23,7 +23,7 @@ struct NormalCmdDesc void (*func)(Context& context, NormalParams params); }; -using KeyMap = Vector; +using KeyMap = const ArrayView; extern KeyMap keymap; }