projects
/
suckless
/
dmenu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b57480
)
Fix cursor drawn position with wide glyphs
author
Quentin Rameau
<quinq@fifth.space>
Sun, 22 Apr 2018 12:18:34 +0000
(14:18 +0200)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Sun, 22 Apr 2018 12:19:20 +0000
(14:19 +0200)
dmenu.c
patch
|
blob
|
history
diff --git
a/dmenu.c
b/dmenu.c
index 314256f0c3cf567d80d19d8157ac149dc3be9eb6..d764658ba9859638a516629cac0b1785f90679da 100644
(file)
--- 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);