diff --git a/AUTHORS b/AUTHORS index 04b9550..fce382a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,4 +14,5 @@ guobin2312 lukebond namhyung +ethanherbertson diff --git a/include/main.h b/include/main.h index 9359952..7f51e92 100644 --- a/include/main.h +++ b/include/main.h @@ -25,6 +25,6 @@ #define MDP_VER_MAJOR 1 #define MDP_VER_MINOR 0 -#define MDP_VER_REVISION 13 +#define MDP_VER_REVISION 14 #endif // !defined( MAIN_H ) diff --git a/include/markdown.h b/include/markdown.h index 7a435a8..8e33c8e 100644 --- a/include/markdown.h +++ b/include/markdown.h @@ -74,6 +74,7 @@ struct _slide_t *next; int lines; int stop; + int lines_consumed; } slide_t; typedef struct _deck_t { 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 @@ max_lines_slide = sc; } + slide->lines_consumed = lc; slide = slide->next; ++sc; } @@ -337,7 +338,8 @@ // 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))