]> git.armaanb.net Git - dmenu.git/commitdiff
limit lines to input
authorConnor Lane Smith <cls@lubutu.com>
Thu, 13 Oct 2011 19:43:59 +0000 (20:43 +0100)
committerConnor Lane Smith <cls@lubutu.com>
Thu, 13 Oct 2011 19:43:59 +0000 (20:43 +0100)
dmenu.c

diff --git a/dmenu.c b/dmenu.c
index 5d119322b154b5ae14665eb29ef7c09c6b86d74c..f105b5679d38cb0d10f2239f3a4836076662af5f 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