From: Michael Göhler Date: Thu, 6 Nov 2014 22:56:50 +0000 (+0100) Subject: removed duplicated expression X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=d2fc31c1f5458db55941c531d7270ae70979f864;p=smdp.git removed duplicated expression --- diff --git a/src/viewer.c b/src/viewer.c index 574c3a0..b9dcbf7 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -615,7 +615,7 @@ void inline_display(WINDOW *window, const char *c, const int colors) { //TODO this condition looks ugly if(i == c || *(i - 1) == ' ' || - ((i + 1 > c) && (*(i - 1) == '_' || *(i - 1) == '*') && (*(i - 2) == ' ' || (i - 1) == c)) || + ((*(i - 1) == '_' || *(i - 1) == '*') && ((i - 1) == c || *(i - 2) == ' ')) || *i == '\\') { switch(*i) {