summaryrefslogtreecommitdiff
path: root/src/normal.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-03-05 19:57:46 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-03-05 19:57:46 +0000
commit2d93933d81ea7e00b0541396e11087ef01c4ff7d (patch)
tree79e05f268d4f972536821c606e532e8cf3767d39 /src/normal.hh
parent99996902de8d28565e3a3ae26e60e0977e209c24 (diff)
Rework keymap to use function pointer rather than std::function
Diffstat (limited to 'src/normal.hh')
-rw-r--r--src/normal.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/normal.hh b/src/normal.hh
index 4baa21df..7f90075d 100644
--- a/src/normal.hh
+++ b/src/normal.hh
@@ -3,8 +3,7 @@
#include "keys.hh"
#include "unordered_map.hh"
-
-#include <functional>
+#include "string.hh"
namespace Kakoune
{
@@ -19,12 +18,12 @@ struct NormalParams
struct NormalCmdDesc
{
- const char* docstring;
- std::function<void (Context& context, NormalParams params)> func;
+ StringView docstring;
+ void (*func)(Context& context, NormalParams params);
};
using KeyMap = UnorderedMap<Key, NormalCmdDesc>;
-extern KeyMap keymap;
+extern const KeyMap keymap;
}