aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.12
-rw-r--r--main.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/dmenu.1 b/dmenu.1
index 4e44e27..56c3bdd 100644
--- a/dmenu.1
+++ b/dmenu.1
@@ -82,7 +82,7 @@ Quit without selecting an item. Returns
82on termination. 82on termination.
83.TP 83.TP
84.B Backspace (Control\-h) 84.B Backspace (Control\-h)
85Remove enough characters from the input field to change its filtering effect. 85Remove a character from the input field.
86.TP 86.TP
87.B Control\-u 87.B Control\-u
88Remove all characters from the input field. 88Remove all characters from the input field.
diff --git a/main.c b/main.c
index 210792a..b733feb 100644
--- a/main.c
+++ b/main.c
@@ -289,12 +289,8 @@ kpress(XKeyEvent * e) {
289 } 289 }
290 break; 290 break;
291 case XK_BackSpace: 291 case XK_BackSpace:
292 if((i = len)) { 292 if(len) {
293 prev_nitem = nitem; 293 text[--len] = 0;
294 do {
295 text[--i] = 0;
296 match(text);
297 } while(i && nitem && prev_nitem == nitem);
298 match(text); 294 match(text);
299 } 295 }
300 break; 296 break;