diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-27 19:32:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-27 19:32:40 -0700 |
commit | 1c4230a7bcb3f1dbf83a1fb995a938e793734710 (patch) | |
tree | f8853131f42960f6e5505f5c6bac4c46d94dc132 | |
parent | 02f87f26d8c74d43c2fedd8f378a163a808e9a92 (diff) | |
download | pw-1c4230a7bcb3f1dbf83a1fb995a938e793734710.tar.gz pw-1c4230a7bcb3f1dbf83a1fb995a938e793734710.tar.bz2 pw-1c4230a7bcb3f1dbf83a1fb995a938e793734710.zip |
Redraw bugfix: redraw from snapshot when suspended.
Without this, we cannot move horizontally while suspended, because
the display refuses to refresh. Suspend mode means that we still
refresh the display, but using the current snapshot data, rather
than replacing that snapshot from the FIFO.
-rw-r--r-- | pw.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -204,7 +204,9 @@ static void redraw(char **circbuf, int nlines, int hpos, snapshot[i] = dsref(circbuf[i]); } } else { - clrline(); + printf("\r\033[%dA\033[J", snaplines); + for (int i = 0; i < snaplines; i++) + drawline(snapshot[i], hpos, columns); } drawstatus(stat, cmd); } |