aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-02 21:02:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-02 21:02:18 -0700
commite153fa3d6207b5139db352e58cd775c7e42ad202 (patch)
tree8a3bacba0b127365d2b3a3284f898a7b54fe6899
parent5c30cf42afdfebbc78b391bcdecd233af1442176 (diff)
downloadpw-e153fa3d6207b5139db352e58cd775c7e42ad202.tar.gz
pw-e153fa3d6207b5139db352e58cd775c7e42ad202.tar.bz2
pw-e153fa3d6207b5139db352e58cd775c7e42ad202.zip
On EOF, don't call redraw, but only drawstatus.
EOF is not an event which triggers an update. We want to show EOF in the status line, if not auto-exiting.
-rw-r--r--pw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pw.c b/pw.c
index ee34f18..379bc8a 100644
--- a/pw.c
+++ b/pw.c
@@ -836,8 +836,6 @@ int main(int argc, char **argv)
if (ch == EOF) {
if (feof(stdin) || (errno != EAGAIN && errno != EWOULDBLOCK)) {
nfds = 1;
- stat |= stat_eof;
- stat = redraw(circbuf, nlines, hpos, hist, columns, stat, curcmd);
if (!ferror(stdin))
exit_status = 0;
if (auto_quit) {
@@ -845,6 +843,9 @@ int main(int argc, char **argv)
clrline(stat);
break;
}
+ stat |= stat_eof;
+ clrline(stat);
+ drawstatus(hist, columns, stat, curcmd);
}
clearerr(stdin);
} else {