From 2c0313a3b51b9b3fc8469f47dcc017cf84397bca Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 8 Dec 2024 08:22:27 +0100 Subject: [PATCH] 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 --- src/editline.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/editline.c b/src/editline.c index d74e225..4522959 100644 --- a/src/editline.c +++ b/src/editline.c @@ -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);