From 80fbb7e1ead4d16f1f4d511d30df18eeb65ceafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Bakker?= Date: Fri, 16 Jun 2023 11:59:25 +0200 Subject: Add fullscreen param to vis_pipe_collect() and Lua API vis:pipe() This enables restoring the terminal from a fullscreen command like curses based program. Use cases are e.g. a file picker based on some external program like nnn (https://github.com/jarun/nnn). --- sam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sam.c') diff --git a/sam.c b/sam.c index d088e9c..5a8a0b1 100644 --- a/sam.c +++ b/sam.c @@ -1739,7 +1739,7 @@ static bool cmd_filter(Vis *vis, Win *win, Command *cmd, const char *argv[], Sel buffer_init(&bufout); buffer_init(&buferr); - int status = vis_pipe(vis, win->file, range, &argv[1], &bufout, read_buffer, &buferr, read_buffer); + int status = vis_pipe(vis, win->file, range, &argv[1], &bufout, read_buffer, &buferr, read_buffer, false); if (vis->interrupted) { vis_info_show(vis, "Command cancelled"); @@ -1779,7 +1779,7 @@ static bool cmd_pipeout(Vis *vis, Win *win, Command *cmd, const char *argv[], Se Buffer buferr; buffer_init(&buferr); - int status = vis_pipe(vis, win->file, range, (const char*[]){ argv[1], NULL }, NULL, NULL, &buferr, read_buffer); + int status = vis_pipe(vis, win->file, range, (const char*[]){ argv[1], NULL }, NULL, NULL, &buferr, read_buffer, false); if (vis->interrupted) vis_info_show(vis, "Command cancelled"); -- cgit v1.2.3