dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 7729e80cbe287a1026c2113a6e8dbc402e75249f
parent c15128cf3cae3f4864d90642592990111eb6f7ad
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 31 Oct 2014 11:20:16 +0100

Use for instead of while loop

Diffstat:
vt.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/vt.c b/vt.c @@ -1223,8 +1223,7 @@ static void puttab(Vt *t, int count) { Buffer *b = t->buffer; int direction = count >= 0 ? 1 : -1; - int col = b->curs_col + direction; - while (count) { + for (int col = b->curs_col + direction; count; col += direction) { if (col < 0) { b->curs_col = 0; break; @@ -1237,7 +1236,6 @@ static void puttab(Vt *t, int count) b->curs_col = col; count -= direction; } - col += direction; } }