mirror of
https://github.com/troglobit/editline.git
synced 2025-05-05 20:11:12 +08:00
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:
parent
41d80b5b14
commit
2c0313a3b5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user