vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 608213116d6b55f7a2a88a569758a68433ab5399
parent 57ded0c0a1ddfe8720df731d7c58a43cd1d9b28d
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue,  9 Sep 2014 08:53:50 +0200

Change mode input prototype

Diffstat:
Mconfig.def.h | 9+++------
Mmain.c | 2+-
2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -327,10 +327,9 @@ static void operator(const Arg *arg) { } } -static bool operator_invalid(const char *str, size_t len) { +static void operator_invalid(const char *str, size_t len) { action_reset(&action); switchmode_to(mode_prev); - return false; } static void movement_key(const Arg *arg) { @@ -780,9 +779,8 @@ static KeyBinding vis_insert_mode[] = { { /* empty last element, array terminator */ }, }; -static bool vis_insert_input(const char *str, size_t len) { +static void vis_insert_input(const char *str, size_t len) { vis_insert_key(vis, str, len); - return true; } static KeyBinding vis_replace[] = { @@ -790,9 +788,8 @@ static KeyBinding vis_replace[] = { { /* empty last element, array terminator */ }, }; -static bool vis_replace_input(const char *str, size_t len) { +static void vis_replace_input(const char *str, size_t len) { vis_replace_key(vis, str, len); - return true; } static Mode vis_modes[] = { diff --git a/main.c b/main.c @@ -46,7 +46,7 @@ struct Mode { void (*enter)(Mode *old); void (*leave)(Mode *new); bool (*unknown)(Key *key0, Key *key1); /* unknown key for this mode, return value determines whether parent modes will be checked */ - bool (*input)(const char *str, size_t len); /* unknown key for this an all parent modes */ + void (*input)(const char *str, size_t len); /* unknown key for this an all parent modes */ void (*idle)(void); };