fix one small thing with last commit

This commit is contained in:
speedie 2023-03-08 22:51:00 +01:00
parent c92d21c5c3
commit b84494043f
2 changed files with 1 additions and 2 deletions

1
TODO
View file

@ -1,5 +1,4 @@
# TODO for spmenu
- Mouse bind array (mouse.h)
- Remove SGR sequences from width when item text is drawn, currently the width of the item before SGR sequences are used, resulting in some ugly behavior for the selected item (drawitem function libs/draw.c)
- Add configuration file using (probably) libconfig

View file

@ -66,7 +66,7 @@ drawitem(struct item *item, int x, int y, int w)
buffer[wr] = '\0'; /* clear out character */
apply_fribidi(buffer);
rw = TEXTW(buffer) - lrpad;
rw = MIN(w, TEXTW(buffer) - lrpad);
drw_text(drw, x, y, rw + lp, bh, lp, isrtl ? fribidi_text : buffer, 0, pango_item ? True : False);
x += rw + lp;