From 1c4230a7bcb3f1dbf83a1fb995a938e793734710 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 27 Apr 2022 19:32:40 -0700 Subject: 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. --- pw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pw.c b/pw.c index 7f39674..96181f0 100644 --- a/pw.c +++ b/pw.c @@ -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); } -- cgit v1.2.3