summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2018-04-22 14:18:34 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-04-22 14:19:20 +0200
commit0f76dd2fb89748eb5460adbc87c4e98bcce09763 (patch)
tree922ece3129ed9d710a118a386bc19da6afb54e22 /dmenu.c
parent0b5748021877b2f214474b034d8bf0122ee88ed2 (diff)
Fix cursor drawn position with wide glyphs
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 314256f..d764658 100644
--- a/dmenu.c
+++ b/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);