aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw.c b/pw.c
index 5d5c5b9..6538cbd 100644
--- a/pw.c
+++ b/pw.c
@@ -446,7 +446,7 @@ static unsigned redraw(char **circbuf, int nlines, unsigned hpos, unsigned hist,
if ((stat & stat_bkgnd))
return stat;
- if (updln) {
+ if (updln && snaplines[hist] > 0) {
printf("\r\033[%dA", snaplines[hist]);
if ((stat & stat_lino) == 0) {
for (int i = 0; i < snaplines[hist]; i++)