mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Ticket #256
fix: Alt+Backspace (kill word) behaviour in command line Signed-off-by: Ilia Maslakov <il.smind@google.com>
This commit is contained in:
parent
b009a7b5fa
commit
51771e0092
14
src/widget.c
14
src/widget.c
@ -1388,16 +1388,24 @@ backward_word (WInput *in)
|
||||
const char *p = in->buffer + str_offset_to_pos (in->buffer, in->point);
|
||||
|
||||
while ((p != in->buffer) && (p[0] == '\0')) {
|
||||
p--;
|
||||
p--;
|
||||
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--;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user