fixed overlapping of wrapped lines for #15
[smdp.git] / src / viewer.c
index 09a0498..3e4284b 100644 (file)
@@ -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