changed Backspace/C-w behavior (now it only removes a single character)
authorAnselm R. Garbe <arg@suckless.org>
Mon, 26 Feb 2007 13:07:19 +0000 (14:07 +0100)
committerAnselm R. Garbe <arg@suckless.org>
Mon, 26 Feb 2007 13:07:19 +0000 (14:07 +0100)
dmenu.1
main.c

diff --git a/dmenu.1 b/dmenu.1
index 4e44e27..56c3bdd 100644 (file)
--- a/dmenu.1
+++ b/dmenu.1
@@ -82,7 +82,7 @@ Quit without selecting an item. Returns
 on termination.
 .TP
 .B Backspace (Control\-h)
-Remove enough characters from the input field to change its filtering effect.
+Remove a character from the input field.
 .TP
 .B Control\-u
 Remove all characters from the input field.
diff --git a/main.c b/main.c
index 210792a..b733feb 100644 (file)
--- a/main.c
+++ b/main.c
@@ -289,12 +289,8 @@ kpress(XKeyEvent * e) {
                }
                break;
        case XK_BackSpace:
-               if((i = len)) {
-                       prev_nitem = nitem;
-                       do {
-                               text[--i] = 0;
-                               match(text);
-                       } while(i && nitem && prev_nitem == nitem);
+               if(len) {
+                       text[--len] = 0;
                        match(text);
                }
                break;