AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.08k stars 351 forks source link

[FIX] Mismatch a marked item on MultiSelect. #246

Closed gjbae1212 closed 4 years ago

gjbae1212 commented 5 years ago

First off, it is a great library. I have used this library very well.

The issue that i'm using the MultiSelect is that marked items mismatch when a cursor is moving on paginating items. I have many items, so i should paginate items.

it seems the MultiSelect should compare an index on an option, not index on for-loop(PageEntries).

please check this. thanks.

AlecAivazis commented 4 years ago

Thanks for submitting this! Sorry I didn't sooner. Mind adding a test that verifies the behavior?

AlecAivazis commented 4 years ago

Travis should now be fixed. Mind rebasing and giving it a shot?

gjbae1212 commented 4 years ago

Ok. I will add a rebase and a test.

gjbae1212 commented 4 years ago

@AlecAivazis I have added a rebase and a test. check plz.

AlecAivazis commented 4 years ago

Looks good! I verified that without the change, the test fails. Not sure how this got passed us for so long

AlecAivazis commented 4 years ago

This is now published in v2.0.4. Thanks again for the contribution @gjbae1212!!