tchanged Backspace/C-w behavior (now it only removes a single character) - dmenu - Dmenu fork with xft fonts.
(HTM) git clone git://r-36.net/dmenu
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 03c2b05bb2265e0ef7ba33b7f6df36bd6e0ce54d
(DIR) parent 8a066fabd9796ca80f5a359c3c6cf57c947b1b95
(HTM) Author: Anselm R. Garbe <arg@suckless.org>
Date: Mon, 26 Feb 2007 14:07:19 +0100
changed Backspace/C-w behavior (now it only removes a single character)
Diffstat:
dmenu.1 | 2 +-
main.c | 8 ++------
2 files changed, 3 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/dmenu.1 b/dmenu.1
t@@ -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.
(DIR) diff --git a/main.c b/main.c
t@@ -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;