}
static void
-input(char *pattern)
+match(char *pattern)
{
unsigned int plen;
Item *i, *j;
case XK_U:
case XK_u:
text[0] = 0;
- input(text);
+ match(text);
drawmenu();
return;
break;
if(!sel)
return;
strncpy(text, sel->text, sizeof(text));
- input(text);
+ match(text);
break;
case XK_Right:
if(!(sel && sel->right))
prev_nitem = nitem;
do {
text[--i] = 0;
- input(text);
+ match(text);
} while(i && nitem && prev_nitem == nitem);
- input(text);
+ match(text);
}
break;
default:
strncat(text, buf, sizeof(text));
else
strncpy(text, buf, sizeof(text));
- input(text);
+ match(text);
}
}
drawmenu();
}
static char *
-readinput()
+readstdin()
{
static char *maxname = NULL;
char *p, buf[1024];
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
- maxname = readinput();
+ maxname = readstdin();
/* grab as early as possible, but after reading all items!!! */
while(XGrabKeyboard(dpy, root, True, GrabModeAsync,
cmdw = mw / 3;
text[0] = 0;
- input(text);
+ match(text);
XMapRaised(dpy, win);
drawmenu();
XSync(dpy, False);