ignore prompt if it is empty in addition to NULL
1299e414
1 file(s) · +2 −2
| 169 | 169 | dc->h = bh; |
|
| 170 | 170 | drawrect(dc, 0, 0, mw, mh, True, BG(dc, normcol)); |
|
| 171 | 171 | ||
| 172 | - | if(prompt) { |
|
| 172 | + | if(prompt && *prompt) { |
|
| 173 | 173 | dc->w = promptw; |
|
| 174 | 174 | drawtext(dc, prompt, selcol); |
|
| 175 | 175 | dc->x = dc->w; |
|
| 579 | 579 | y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh; |
|
| 580 | 580 | mw = DisplayWidth(dc->dpy, screen); |
|
| 581 | 581 | } |
|
| 582 | - | promptw = prompt ? textw(dc, prompt) : 0; |
|
| 582 | + | promptw = (prompt && *prompt) ? textw(dc, prompt) : 0; |
|
| 583 | 583 | inputw = MIN(inputw, mw/3); |
|
| 584 | 584 | match(); |
|
| 585 | 585 | ||