[hackers] [dmenu] changed Backspace/C-w behavior (now it only removes a single character)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Mon Feb 26 14:11:57 2007

changeset: 183:8963b2a66a66
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Mon Feb 26 14:07:19 2007 +0100
summary: changed Backspace/C-w behavior (now it only removes a single character)

diff -r 8ea08a5e0735 -r 8963b2a66a66 dmenu.1
--- a/dmenu.1 Mon Feb 26 11:44:41 2007 +0100
+++ b/dmenu.1 Mon Feb 26 14:07:19 2007 +0100
@@ -82,7 +82,7 @@ on termination.
 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 -r 8ea08a5e0735 -r 8963b2a66a66 main.c
--- a/main.c Mon Feb 26 11:44:41 2007 +0100
+++ b/main.c Mon Feb 26 14:07:19 2007 +0100
@@ -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;
Received on Mon Feb 26 2007 - 14:11:57 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:58 UTC