Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed FORWARD_WORD to actually match readline behavior #15

Merged
merged 1 commit into from
Jan 20, 2012
Merged

Fixed FORWARD_WORD to actually match readline behavior #15

merged 1 commit into from
Jan 20, 2012

Conversation

cosmin
Copy link
Contributor

@cosmin cosmin commented Jan 20, 2012

The current implementation of FORWARD_WORD does not actually match readline behavior. It incorrectly moves one separator past the end of the word. To illustrate (using | to show the cursor):

Current behavior:

|one two
one |two

Readline behavior:

|one two
one| two

The current problem is because the logic in nextWord() is implementing by looking at the character before the cursor instead of the character after cursor. This pull request fixes this problem and results in matching the behavior of readline.

gnodet added a commit that referenced this pull request Jan 20, 2012
Fixed FORWARD_WORD to actually match readline behavior
@gnodet gnodet merged commit 47deccf into jline:master Jan 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants