From ae643ff68dae4ac4e0aa1005b38642ba4d99e225 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Tue, 26 Apr 2022 23:13:26 +0200 Subject: [PATCH] fuzzyhighlight: addressing graphical highlight glitch when lrpad is an odd number ref. #12 --- patch/fuzzyhighlight.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patch/fuzzyhighlight.c b/patch/fuzzyhighlight.c index 737b5d9..20ee920 100644 --- a/patch/fuzzyhighlight.c +++ b/patch/fuzzyhighlight.c @@ -33,7 +33,7 @@ drawhighlights(struct item *item, int x, int y, int maxw) /* get indentation */ c = *highlight; *highlight = '\0'; - indent = TEXTW(itemtext); + indent = TEXTW(itemtext) - lrpad; *highlight = c; /* highlight character */ @@ -41,9 +41,9 @@ drawhighlights(struct item *item, int x, int y, int maxw) highlight[1] = '\0'; drw_text( drw, - x + indent - (lrpad / 2), + x + indent + (lrpad / 2), y, - MIN(maxw - indent, TEXTW(highlight) - lrpad), + MIN(maxw - indent + lrpad, TEXTW(highlight) - lrpad), bh, 0, highlight, 0 #if PANGO_PATCH , True