aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2010-07-30 10:26:12 +0100
committerConnor Lane Smith <cls@lubutu.com>2010-07-30 10:26:12 +0100
commit7f36736d11418b0b11d02da8aa0cb663406706c2 (patch)
treeb0960ab0da5845708e7d258daf286d3d2948d281
parent115c01b74ebd57382679bec5c6e1ff5604370cbf (diff)
underline match
-rw-r--r--dmenu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dmenu.c b/dmenu.c
index 076cffe..9386e06 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -158,8 +158,13 @@ drawbar(void) {
158 158
159void 159void
160drawitem(const char *s, unsigned long col[ColLast]) { 160drawitem(const char *s, unsigned long col[ColLast]) {
161 const char *p;
162 unsigned int w = textnw(&dc, text, strlen(text));
163
161 drawbox(&dc, col); 164 drawbox(&dc, col);
162 drawtext(&dc, s, col); 165 drawtext(&dc, s, col);
166 for(p = fstrstr(s, text); *text && (p = fstrstr(p, text)); p++)
167 drawline(&dc, textnw(&dc, s, p-s) + dc.h/2 - 1, dc.h-2, w, 1, col);
163} 168}
164 169
165void 170void