limit lines to input
[dmenu.git] / dmenu.c
diff --git a/dmenu.c b/dmenu.c
index 5d11932..f105b56 100644 (file)
--- a/dmenu.c
+++ b/dmenu.c
@@ -454,6 +454,7 @@ readstdin(void) {
        if(items)
                items[i].text = NULL;
        inputw = maxstr ? textw(dc, maxstr) : 0;
+       lines = MIN(lines, i);
 }
 
 void