Make M-f behave like it does in Readline

This commit is contained in:
Přemysl Eric Janouch 2022-09-18 01:07:47 +02:00
parent 5cda848f94
commit d8e0d1b2fe
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -185,8 +185,8 @@ line_editor_action (struct line_editor *self, enum line_editor_action action)
if (self->point + 1 > (int) self->len)
return false;
int i = self->point;
while (i < (int) self->len && self->line[i] != ' ') i++;
while (i < (int) self->len && self->line[i] == ' ') i++;
while (i < (int) self->len && self->line[i] != ' ') i++;
self->point = i;
return true;
}