diff --git a/libs/draw.c b/libs/draw.c index fa161fd..e6cb890 100644 --- a/libs/draw.c +++ b/libs/draw.c @@ -1,17 +1,18 @@ /* See LICENSE file for copyright and license details. */ -void drawhighlights(struct item *item, int x, int y, int w, int p, const char *ittext) { +void drawhighlights(struct item *item, int x, int y, int w, int p, char *itemtext) { int i, indent; char *highlight; char c; // limitation in order to prevent highlighting from drawing when the text isn't visible - if (columns > 5 && lines > 1) return; + if (columns > 5 && lines > 1) + return; - char *itemtext = strdup(ittext); + if (!(strlen(itemtext) && strlen(tx.text))) + return; - if (!(strlen(itemtext) && strlen(tx.text))) return; - - if (strstr(itemtext, "