From d931b14863838a8dceed8cd95c71a75a271cca6b Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Thu, 15 Dec 2022 18:06:59 +0100 Subject: Make minibuffer use an actual buffer Also fix some issues with inserting multibyte chars. --- src/command.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/command.c') diff --git a/src/command.c b/src/command.c index 4b233b2..fcf53e2 100644 --- a/src/command.c +++ b/src/command.c @@ -64,3 +64,14 @@ struct command *lookup_command_by_hash(struct commands *commands, return NULL; } + +int32_t execute_command(struct command *command, struct buffer *current_buffer, + int argc, const char *argv[]) { + + command->fn((struct command_ctx){.current_buffer = current_buffer, + .userdata = command->userdata}, + argc, argv); + + // TODO + return 0; +} -- cgit v1.2.3