From e153fa3d6207b5139db352e58cd775c7e42ad202 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 2 May 2022 21:02:18 -0700 Subject: 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. --- pw.c | 5 +++-- 1 file 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 { -- cgit v1.2.3