From 8ea82f861ae1dd0d842b1fe035d0b23d7b5d3ed7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 3 Jan 2014 23:42:38 +0000 Subject: [PATCH 1/1] gui: Reset command buf offset on errors. On read errors or EOF we close the pipe that corresponds to stdout/stderr of the current display command. However, we miss to reset the offset value of the command buffer in this case. If this offset was positive at the time the read error occurred, we skip the first part of the output of the next command. Fix this by always resetting the offset after closing the pipe. --- gui.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gui.c b/gui.c index 716e299b..2a0174b8 100644 --- a/gui.c +++ b/gui.c @@ -1054,6 +1054,7 @@ repeat: close(command_fds[i]); command_fds[i] = -1; flags[i] = 0; + cbo[i] = 0; if (command_fds[!i] < 0) /* both fds closed */ return 0; } -- 2.39.2