diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-02 21:02:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-02 21:02:18 -0700 |
commit | e153fa3d6207b5139db352e58cd775c7e42ad202 (patch) | |
tree | 8a3bacba0b127365d2b3a3284f898a7b54fe6899 | |
parent | 5c30cf42afdfebbc78b391bcdecd233af1442176 (diff) | |
download | pw-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 { |