aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-26 14:07:19 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-26 14:07:19 +0100
commit03c2b05bb2265e0ef7ba33b7f6df36bd6e0ce54d (patch)
tree8cc380e6e00ffd98e5e1827f5b1ee98643d4614d /main.c
parent8a066fabd9796ca80f5a359c3c6cf57c947b1b95 (diff)
downloaddmenu-03c2b05bb2265e0ef7ba33b7f6df36bd6e0ce54d.tar.gz
dmenu-03c2b05bb2265e0ef7ba33b7f6df36bd6e0ce54d.tar.bz2
dmenu-03c2b05bb2265e0ef7ba33b7f6df36bd6e0ce54d.zip
changed Backspace/C-w behavior (now it only removes a single character)
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 2 insertions, 6 deletions
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) {
}
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;