From 11ede8254974aba6e1ef318ab90374fb85e6bf5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 12 Jan 2016 15:48:17 +0100 Subject: vis: cleanup key binding definitions This removes the tree based mode structures and instead merges all keybindings in flat modes which uses some more memory but will allow (per mode) run-time configurable key bindings. Make sure to update/remove config.h. --- vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 6ccd584..7af4654 100644 --- a/vis.c +++ b/vis.c @@ -604,7 +604,7 @@ static void action_do(Vis *vis, Action *a) { } else { vis_prompt_show(vis, ":", "'<,'>!"); } - } else if (vis->mode == &vis_modes[VIS_MODE_OPERATOR]) { + } else if (vis->mode == &vis_modes[VIS_MODE_OPERATOR_PENDING]) { mode_set(vis, vis->mode_prev); } else if (vis->mode->visual) { vis_mode_switch(vis, VIS_MODE_NORMAL); @@ -966,7 +966,7 @@ bool vis_operator(Vis *vis, enum VisOperator id, ...) { /* switch to operator mode inorder to make operator options and * text-object available */ - vis_mode_switch(vis, VIS_MODE_OPERATOR); + vis_mode_switch(vis, VIS_MODE_OPERATOR_PENDING); if (vis->action.op == op) { /* hacky way to handle double operators i.e. things like * dd, yy etc where the second char isn't a movement */ -- cgit v1.2.3