Просмотр исходного кода

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

master
Anselm R. Garbe 17 лет назад
Родитель
Сommit
03c2b05bb2
2 измененных файлов: 3 добавлений и 7 удалений
  1. +1
    -1
      dmenu.1
  2. +2
    -6
      main.c

+ 1
- 1
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.


+ 2
- 6
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;


Загрузка…
Отмена
Сохранить