aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-02 13:12:15 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-02 13:52:00 +0100
commit3b07039fecbab82ecdefbdb2c064a839d506431a (patch)
tree2ad22a5e2958e18eb5f6a09ccba3189a0a6053f0 /main.c
parent6db279e12d40b1fb3863ff645cf130d1bcf7384c (diff)
downloadvis-3b07039fecbab82ecdefbdb2c064a839d506431a.tar.gz
vis-3b07039fecbab82ecdefbdb2c064a839d506431a.tar.xz
Slight code cleanups, use buffer API where appropriate
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index 100862c..2e1eeb5 100644
--- a/main.c
+++ b/main.c
@@ -2150,8 +2150,8 @@ static char *get_completion_prefix(Vis *vis, Filerange (*text_object)(Text *, si
}
static void insert_dialog_selection(Vis *vis, Filerange *range, const char *argv[]) {
- char *out = NULL, *err = NULL;
- if (vis_pipe_collect(vis, range, argv, &out, &err) == 0) {
+ char *out = NULL;
+ if (vis_pipe_collect(vis, range, argv, &out, NULL) == 0) {
View *view = vis_view(vis);
size_t len = out ? strlen(out) : 0;
for (Cursor *c = view_cursors(view); c; c = view_cursors_next(c)) {
@@ -2164,7 +2164,6 @@ static void insert_dialog_selection(Vis *vis, Filerange *range, const char *argv
}
vis_draw(vis);
free(out);
- free(err);
}
static const char *complete_word(Vis *vis, const char *keys, const Arg *arg) {