X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fviewer.c;h=b9dcbf72759572fa52fd94238793fa50a9462f06;hb=41ecaf14d666a9d9bf26427b7b164b2bf12de8e1;hp=2cf0f0e5bba99305a03e069f8ebf105d9162f4ec;hpb=8aa16fe57be3d85e46815509df69a61682be9bf0;p=smdp.git diff --git a/src/viewer.c b/src/viewer.c index 2cf0f0e..b9dcbf7 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -266,6 +266,7 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert) { "%d / %d", sc, deck->slides); // make header + fooder visible + wrefresh(content); wrefresh(stdscr); line = slide->line; @@ -611,10 +612,11 @@ void inline_display(WINDOW *window, const char *c, const int colors) { // emphasis or code span can start after new-line or space only // and of cause after another emphasis markup - if(*(i - 1) == ' ' || - ((*(i - 1) == '_' || *(i - 1) == '*') && (*(i - 2) == ' ' || (i - 1) == c)) || - *i == '\\' || - i == c) { + //TODO this condition looks ugly + if(i == c || + *(i - 1) == ' ' || + ((*(i - 1) == '_' || *(i - 1) == '*') && ((i - 1) == c || *(i - 2) == ' ')) || + *i == '\\') { switch(*i) { // enable highlight