aboutsummaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dmenu.c b/dmenu.c
index f7eba87..3962801 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -169,7 +169,7 @@ drawmenu(void) {
169 dc->h = bh; 169 dc->h = bh;
170 drawrect(dc, 0, 0, mw, mh, True, BG(dc, normcol)); 170 drawrect(dc, 0, 0, mw, mh, True, BG(dc, normcol));
171 171
172 if(prompt) { 172 if(prompt && *prompt) {
173 dc->w = promptw; 173 dc->w = promptw;
174 drawtext(dc, prompt, selcol); 174 drawtext(dc, prompt, selcol);
175 dc->x = dc->w; 175 dc->x = dc->w;
@@ -579,7 +579,7 @@ setup(void) {
579 y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh; 579 y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh;
580 mw = DisplayWidth(dc->dpy, screen); 580 mw = DisplayWidth(dc->dpy, screen);
581 } 581 }
582 promptw = prompt ? textw(dc, prompt) : 0; 582 promptw = (prompt && *prompt) ? textw(dc, prompt) : 0;
583 inputw = MIN(inputw, mw/3); 583 inputw = MIN(inputw, mw/3);
584 match(); 584 match();
585 585