all repos — dmenu @ 1299e41447fe5850d127857a68f37c5badd491ce

my build of dmenu

ignore prompt if it is empty in addition to NULL
Moritz Wilhelmy moritz+hg@wzff.de
Tue, 15 May 2012 11:47:54 +0200
commit

1299e41447fe5850d127857a68f37c5badd491ce

parent

38fccafada4eee3e4e0301d7c6eadd3c5788b305

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M dmenu.cdmenu.c

@@ -169,7 +169,7 @@ dc->y = 0;

dc->h = bh; drawrect(dc, 0, 0, mw, mh, True, BG(dc, normcol)); - if(prompt) { + if(prompt && *prompt) { dc->w = promptw; drawtext(dc, prompt, selcol); dc->x = dc->w;

@@ -579,7 +579,7 @@ x = 0;

y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh; mw = DisplayWidth(dc->dpy, screen); } - promptw = prompt ? textw(dc, prompt) : 0; + promptw = (prompt && *prompt) ? textw(dc, prompt) : 0; inputw = MIN(inputw, mw/3); match();