X-Git-Url: https://git.xinqibao.xyz/dmenu.git/blobdiff_plain/8e302717cb2d03c79c2f372f5e0489ea54dbb440..5e0156c0727fa8f225c3309f265da241a98edc08:/dmenu.c diff --git a/dmenu.c b/dmenu.c index 5d11932..dc1f236 100644 --- a/dmenu.c +++ b/dmenu.c @@ -41,7 +41,6 @@ static void usage(void); static char text[BUFSIZ] = ""; static int bh, mw, mh; static int inputw, promptw; -static int lines = 0; static size_t cursor = 0; static const char *font = NULL; static const char *prompt = NULL; @@ -49,6 +48,7 @@ static const char *normbgcolor = "#cccccc"; static const char *normfgcolor = "#000000"; static const char *selbgcolor = "#0066ff"; static const char *selfgcolor = "#ffffff"; +static unsigned int lines = 0; static unsigned long normcol[ColLast]; static unsigned long selcol[ColLast]; static Atom utf8; @@ -454,6 +454,7 @@ readstdin(void) { if(items) items[i].text = NULL; inputw = maxstr ? textw(dc, maxstr) : 0; + lines = MIN(lines, i); } void