fix: Alt+Backspace (kill word) behaviour in command line

Signed-off-by: Ilia Maslakov <il.smind@google.com>
This commit is contained in:
Egmont Koblinger 2009-10-07 09:30:56 +00:00 committed by Ilia Maslakov
parent b009a7b5fa
commit 51771e0092

View File

@ -1392,12 +1392,20 @@ backward_word (WInput *in)
in->point--;
}
while ((p != in->buffer) && (str_isspace (p) || str_ispunct (p))) {
while (p != in->buffer) {
str_cprev_char (&p);
if (!str_isspace (p) && !str_ispunct (p)) {
str_cnext_char (&p);
break;
}
in->point--;
}
while ((p != in->buffer) && !str_isspace (p) && !str_ispunct (p)) {
while (p != in->buffer) {
str_cprev_char (&p);
if (str_isspace (p) || str_ispunct (p)) {
str_cnext_char (&p);
break;
}
in->point--;
}
}