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

Bad word pos detection in duplicated word appearance in one line #83

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KSR-Yasuda
Copy link

For lines that have the same word duplicatedly,
it may suggest word-correct list for a different word.

'foo bar' hogefuga bar
#         ^^^^^^^^
#         `ZL` here, and it shows list for `bar`.

It checks word position by splitting the target line, though,
it has not considered the length of cut part.

@KSR-Yasuda
Copy link
Author

Also, it had targeted wrong word for the lines like below:

foo/bar/foobar/foobarbaz
~~~            ^^^^^^^^^
               *

In this case, at the cursor position of *,
it had targeted word foo, that appears in the same line.

It had checked target word list by the word appearing order.
So, if the line had head-matching word of the pointing word (i.e. foo, for foobarbaz),
it had chosen the first appearing one.

To fix this, sorted the word list of the line in word length order.

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.

1 participant