fuzzyhighlight: addressing graphical highlight glitch when lrpad is an odd number ref. #12

This commit is contained in:
bakkeby 2022-04-26 23:13:26 +02:00
parent 528481f7a6
commit ae643ff68d

View File

@ -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