aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-04-27 22:25:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-04-27 22:25:10 -0700
commitacb01d68da78506147356fee4a0efbb32a5b9871 (patch)
treea644fcb16d74425eb6eda7f147b4665a4fe71c42
parent7226354813fe0b8475cc99b01968cf8054d448eb (diff)
downloadpw-acb01d68da78506147356fee4a0efbb32a5b9871.tar.gz
pw-acb01d68da78506147356fee4a0efbb32a5b9871.tar.bz2
pw-acb01d68da78506147356fee4a0efbb32a5b9871.zip
On auto-exit, clear status line of all content.
-rw-r--r--pw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pw.c b/pw.c
index 60cdf13..1dc2a40 100644
--- a/pw.c
+++ b/pw.c
@@ -430,15 +430,15 @@ int main(int argc, char **argv)
if (ch == EOF) {
if (feof(stdin) || (errno != EAGAIN && errno != EWOULDBLOCK)) {
nfds = 1;
- if (!auto_quit)
- stat |= stat_eof;
- redraw(circbuf, nlines, hpos, columns, stat, curcmd);
stat |= stat_eof;
+ redraw(circbuf, nlines, hpos, columns, stat, curcmd);
stat &= ~stat_dirty;
if (!ferror(stdin))
exit_status = 0;
- if (auto_quit)
+ if (auto_quit) {
+ clrline();
break;
+ }
}
clearerr(stdin);
} else {