From: Michael Göhler Date: Mon, 6 Oct 2014 19:38:35 +0000 (+0200) Subject: fixed overlapping of wrapped lines for #15 X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=698e2f33adf0ca6ada826a61b1db0c2dfce3bc3a;p=smdp.git fixed overlapping of wrapped lines for #15 --- diff --git a/src/viewer.c b/src/viewer.c index 09a0498..3e4284b 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -274,8 +274,8 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert) { // print lines while(line) { add_line(content, l, (COLS - max_cols) / 2, line, max_cols, colors); + l += (line->length / COLS) + 1; line = line->next; - l++; } // make content visible