diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-29 17:58:00 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-29 17:58:00 +0100 |
| commit | eda4ab0e8e2f97225e4c0470318e9427e09bbfb9 (patch) | |
| tree | bd988ad26c4dd7825cb5ab7635d16c81c82b6edb /vis.c | |
| parent | a8116c57341f87b293d35ef7e1d140ceb01ed8b1 (diff) | |
| download | vis-eda4ab0e8e2f97225e4c0470318e9427e09bbfb9.tar.gz vis-eda4ab0e8e2f97225e4c0470318e9427e09bbfb9.tar.xz | |
vis: cleanup key action lifetime management
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -511,6 +511,7 @@ Vis *vis_new(Ui *ui, VisEvent *event) { array_init(&vis->motions); array_init(&vis->textobjects); array_init(&vis->bindings); + array_init(&vis->actions_user); action_reset(&vis->action); buffer_init(&vis->input_queue); vis->keys = &vis->input_queue; @@ -574,6 +575,9 @@ void vis_free(Vis *vis) { while (array_length(&vis->bindings)) vis_binding_free(vis, array_get_ptr(&vis->bindings, 0)); array_release(&vis->bindings); + while (array_length(&vis->actions_user)) + vis_action_free(vis, array_get_ptr(&vis->actions_user, 0)); + array_release(&vis->actions_user); free(vis->shell); free(vis); } |
