diff options
author | Quentin Rameau <quinq@fifth.space> | 2018-04-22 14:18:34 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2018-04-22 14:19:20 +0200 |
commit | 0f76dd2fb89748eb5460adbc87c4e98bcce09763 (patch) | |
tree | 922ece3129ed9d710a118a386bc19da6afb54e22 | |
parent | 0b5748021877b2f214474b034d8bf0122ee88ed2 (diff) |
Fix cursor drawn position with wide glyphs
-rw-r--r-- | dmenu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -144,7 +144,7 @@ drawmenu(void) | |||
144 | drw_setscheme(drw, scheme[SchemeNorm]); | 144 | drw_setscheme(drw, scheme[SchemeNorm]); |
145 | drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0); | 145 | drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0); |
146 | 146 | ||
147 | drw_font_getexts(drw->fonts, text, cursor, &curpos, NULL); | 147 | curpos = TEXTW(text) - TEXTW(&text[cursor]); |
148 | if ((curpos += lrpad / 2 - 1) < w) { | 148 | if ((curpos += lrpad / 2 - 1) < w) { |
149 | drw_setscheme(drw, scheme[SchemeNorm]); | 149 | drw_setscheme(drw, scheme[SchemeNorm]); |
150 | drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); | 150 | drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); |