aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dinput.c4
-rw-r--r--dmenu.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/dinput.c b/dinput.c
index e861afc..4bbc7bc 100644
--- a/dinput.c
+++ b/dinput.c
@@ -34,12 +34,14 @@ drawbar(void)
34 /* print prompt? */ 34 /* print prompt? */
35 if(prompt) { 35 if(prompt) {
36 dc.w = promptw; 36 dc.w = promptw;
37 drawbox(&dc, selcol);
37 drawtext(&dc, prompt, selcol); 38 drawtext(&dc, prompt, selcol);
38 dc.x += dc.w; 39 dc.x += dc.w;
39 } 40 }
40 dc.w = mw - dc.x; 41 dc.w = mw - dc.x;
41 drawtext(&dc, text, normcol); 42 drawtext(&dc, text, normcol);
42 drawcursor(&dc, text, cursor, normcol); 43 drawline(&dc, textnw(&dc, text, cursor) + dc.font.height/2, 2, 1,
44 dc.font.height-2, normcol);
43 commitdraw(&dc, win); 45 commitdraw(&dc, win);
44} 46}
45 47
diff --git a/dmenu.c b/dmenu.c
index 2c1867c..076cffe 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -24,7 +24,7 @@ static void calcoffsetsv(void);
24static char *cistrstr(const char *s, const char *sub); 24static char *cistrstr(const char *s, const char *sub);
25static void cleanup(void); 25static void cleanup(void);
26static void dinput(void); 26static void dinput(void);
27static void drawitem(char *s, unsigned long col[ColLast]); 27static void drawitem(const char *s, unsigned long col[ColLast]);
28static void drawmenuh(void); 28static void drawmenuh(void);
29static void drawmenuv(void); 29static void drawmenuv(void);
30static void match(void); 30static void match(void);
@@ -140,6 +140,7 @@ drawbar(void) {
140 /* print prompt? */ 140 /* print prompt? */
141 if(prompt) { 141 if(prompt) {
142 dc.w = promptw; 142 dc.w = promptw;
143 drawbox(&dc, selcol);
143 drawtext(&dc, prompt, selcol); 144 drawtext(&dc, prompt, selcol);
144 dc.x += dc.w; 145 dc.x += dc.w;
145 } 146 }
@@ -156,7 +157,7 @@ drawbar(void) {
156} 157}
157 158
158void 159void
159drawitem(char *s, unsigned long col[ColLast]) { 160drawitem(const char *s, unsigned long col[ColLast]) {
160 drawbox(&dc, col); 161 drawbox(&dc, col);
161 drawtext(&dc, s, col); 162 drawtext(&dc, s, col);
162} 163}