diff -r c12572045630 dmenu.c --- a/dmenu.c Thu Apr 01 21:40:11 2010 +0100 +++ b/dmenu.c Sun Apr 04 01:12:57 2010 +0000 @@ -371,7 +371,7 @@ KeySym ksym; len = strlen(text); - buf[0] = 0; + buf[0] = '\0'; num = XLookupString(e, buf, sizeof buf, &ksym, NULL); if(IsKeypadKey(ksym)) { if(ksym == XK_KP_Enter) @@ -414,7 +414,8 @@ break; case XK_u: case XK_U: - text[0] = 0; + cursor = 0; + text[0] = '\0'; match(text); break; case XK_w: