X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=blobdiff_plain;f=src%2Fviewer.c;fp=src%2Fviewer.c;h=2cf5911b2e112a5f9a1d97d2763aded3d7cdecff;hp=d23ed73cd099162965a021502e230f4627c700a4;hb=75c55236b8382936bb41b4d1b11376b0e4a39c3d;hpb=354cf2e07ccd0d7900f96bffc279093997cbe203 diff --git a/src/viewer.c b/src/viewer.c index d23ed73..2cf5911 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -158,6 +158,7 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert, int reloa max_lines_slide = sc; } + slide->lines_consumed = lc; slide = slide->next; ++sc; } @@ -337,7 +338,8 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert, int reloa // print lines while(line) { - add_line(content, l, (COLS - max_cols) / 2, line, max_cols, colors); + add_line(content, l + ((LINES - slide->lines_consumed - bar_top - bar_bottom) / 2), + (COLS - max_cols) / 2, line, max_cols, colors); // raise stop counter if we pass a line having a stop bit if(CHECK_BIT(line->bits, IS_STOP))