Fix cursor drawn position with wide glyphs
This commit is contained in:
parent
0b57480218
commit
0f76dd2fb8
2
dmenu.c
2
dmenu.c
|
@ -144,7 +144,7 @@ drawmenu(void)
|
|||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
|
||||
|
||||
drw_font_getexts(drw->fonts, text, cursor, &curpos, NULL);
|
||||
curpos = TEXTW(text) - TEXTW(&text[cursor]);
|
||||
if ((curpos += lrpad / 2 - 1) < w) {
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user