From 5166e81e794c0faa80742ad6806745b13b967a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 19 Mar 2017 14:05:32 +0100 Subject: vis: add infrastructure for user specified operators --- vis.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 4c93872..06546ab 100644 --- a/vis.c +++ b/vis.c @@ -676,6 +676,7 @@ Vis *vis_new(Ui *ui, VisEvent *event) { vis->change_colors = true; vis->registers[VIS_REG_BLACKHOLE].type = REGISTER_BLACKHOLE; vis->registers[VIS_REG_CLIPBOARD].type = REGISTER_CLIPBOARD; + array_init(&vis->operators); array_init(&vis->motions); array_init(&vis->textobjects); array_init(&vis->bindings); @@ -745,6 +746,7 @@ void vis_free(Vis *vis) { buffer_release(&vis->input_queue); for (int i = 0; i < VIS_MODE_INVALID; i++) map_free(vis_modes[i].bindings); + array_release_full(&vis->operators); array_release_full(&vis->motions); array_release_full(&vis->textobjects); while (array_length(&vis->bindings)) @@ -852,6 +854,7 @@ void vis_do(Vis *vis) { .reg = reg, .linewise = linewise, .arg = &a->arg, + .context = a->op ? a->op->context : NULL, }; bool err = false; -- cgit v1.2.3