executor: do not output last line if it is not terminated by newline
o9000 mrovi9000@gmail.com
1 files changed,
0 insertions(+),
4 deletions(-)
jump to
M
src/execplugin/execplugin.c
→
src/execplugin/execplugin.c
@@ -727,7 +727,6 @@ return TRUE;
} else if (execp->backend->continuous > 0) { // Count lines in buffer int num_lines = 0; - char *last = execp->backend->buf_output; char *end = NULL; for (char *c = execp->backend->buf_output; *c; c++) { if (*c == '\n') {@@ -735,10 +734,7 @@ num_lines++;
if (num_lines == execp->backend->continuous) end = c; } - last = c; } - if (*last && *last != '\n') - num_lines++; if (num_lines >= execp->backend->continuous) { if (end) *end = '\0';