From 2741751edcdc98b1542780014006442a91429080 Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Sun, 22 Apr 2018 14:18:34 +0200 Subject: [PATCH] Fix cursor drawn position with wide glyphs --- dmenubar/dmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmenubar/dmenu.c b/dmenubar/dmenu.c index 314256f..d764658 100644 --- a/dmenubar/dmenu.c +++ b/dmenubar/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);