X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fviewer.c;h=d23ed73cd099162965a021502e230f4627c700a4;hb=354cf2e07ccd0d7900f96bffc279093997cbe203;hp=cbb1498f73746f889506272642bbbd17a7586ff1;hpb=4ebae8ba8f3700f740d2705f7a3c2dc92f4995dc;p=smdp.git diff --git a/src/viewer.c b/src/viewer.c index cbb1498..d23ed73 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -2,7 +2,7 @@ * Functions necessary to display a deck of slides in different color modes * using ncurses. Only white, red, and blue are supported, as they can be * faded in 256 color mode. - * Copyright (C) 2016 Michael Goehler + * Copyright (C) 2018 Michael Goehler * * This file is part of mdp. * @@ -261,7 +261,7 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert, int reloa slide = deck->slide; // find slide to reload - sc = 0; + sc = 1; while(reload > 1 && reload <= deck->slides) { slide = slide->next; sc++; @@ -656,7 +656,8 @@ void add_line(WINDOW *window, int y, int x, line_t *line, int max_cols, int colo // IS_CODE if(CHECK_BIT(line->bits, IS_CODE)) { - if (!CHECK_BIT(line->bits, IS_TILDE_CODE)) { + if (!CHECK_BIT(line->bits, IS_TILDE_CODE) && + !CHECK_BIT(line->bits, IS_GFM_CODE)) { // set static offset for code offset = CODE_INDENT; } @@ -981,7 +982,7 @@ int int_length (int val) { int get_slide_number(char init) { int retval = init - '0'; - char c; + int c; // block for tenths of a second when using getch, ERR if no input halfdelay(GOTO_SLIDE_DELAY); while((c = getch()) != ERR) {