Move forward wordwise should move to end of current word

For a similar feel like GNU Readline we should not skip to the next word
but stop at the end of the current.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2024-12-08 08:22:27 +01:00
parent 41d80b5b14
commit 2c0313a3b5

View File

@ -463,12 +463,6 @@ static el_status_t do_forward(el_status_t move)
right(CSstay);
}
/* Skip to next word, or skip leading white space if outside a word. */
for ( ; rl_point < rl_end && (p[0] == ' ' || !is_alpha_num(p[0])); rl_point++, p++) {
if (move == CSmove)
right(CSstay);
}
if (rl_point == rl_end)
break;
} while (++i < Repeat);