mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 07:53:41 +03:00
Use a static array to store the keymap
This commit is contained in:
parent
1cec8df45e
commit
d1f17228dd
@ -1350,7 +1350,7 @@ void move(Context& context, NormalParams params)
|
||||
selections.sort_and_merge_overlapping();
|
||||
}
|
||||
|
||||
KeyMap keymap =
|
||||
static NormalCmdDesc cmds[] =
|
||||
{
|
||||
{ 'h', "move left", move<CharCount, Backward> },
|
||||
{ 'j', "move down", move<LineCount, Forward> },
|
||||
@ -1515,4 +1515,6 @@ KeyMap keymap =
|
||||
{ Key::PageDown, "scroll one page down", scroll<Key::PageDown> },
|
||||
};
|
||||
|
||||
KeyMap keymap = cmds;
|
||||
|
||||
}
|
||||
|
@ -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<NormalCmdDesc>;
|
||||
using KeyMap = const ArrayView<NormalCmdDesc>;
|
||||
extern KeyMap keymap;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user