From 0d1152340ccb3c6a0a8b4160fda34cc6687b236e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 18 May 2016 12:31:33 +0200 Subject: vis: add an interactive mode to vis_pipe{,_collect}(...) Previously the interactive mode was implicitly enabled by passing an invalid range. However for some use cases (e.g. completion) we need to be able to pipe a given text range to an external process without also redirecting stderr (which is used to draw the slmenu interface on top of vis). --- sam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 1f5e816..717b380 100644 --- a/sam.c +++ b/sam.c @@ -1150,7 +1150,7 @@ static bool cmd_filter(Vis *vis, Win *win, Command *cmd, const char *argv[], Cur Buffer buferr; buffer_init(&buferr); - int status = vis_pipe(vis, range, &argv[1], &filter, read_text, &buferr, read_buffer); + int status = vis_pipe(vis, range, false, &argv[1], &filter, read_text, &buferr, read_buffer); if (status == 0) { text_delete_range(txt, range); @@ -1198,7 +1198,7 @@ static bool cmd_pipeout(Vis *vis, Win *win, Command *cmd, const char *argv[], Cu Buffer buferr; buffer_init(&buferr); - int status = vis_pipe(vis, range, (const char*[]){ argv[1], NULL }, NULL, NULL, &buferr, read_buffer); + int status = vis_pipe(vis, range, false, (const char*[]){ argv[1], NULL }, NULL, NULL, &buferr, read_buffer); if (status == 0 && cur) view_cursors_to(cur, range->start); -- cgit v1.2.3