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

Fix infinite loop when no selectable items #148

Closed
wants to merge 2 commits into from

Conversation

AydinHassan
Copy link
Member

Resolves #144

@AydinHassan AydinHassan requested a review from Lynesth May 14, 2018 17:05
@codecov-io
Copy link

codecov-io commented May 14, 2018

Codecov Report

Merging #148 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #148      +/-   ##
============================================
+ Coverage      96.8%   96.81%   +<.01%     
- Complexity      429      431       +2     
============================================
  Files            27       27              
  Lines          1314     1318       +4     
============================================
+ Hits           1272     1276       +4     
  Misses           42       42
Impacted Files Coverage Δ Complexity Δ
src/CliMenu.php 98.34% <100%> (+0.02%) 93 <0> (+2) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df8184f...8158de5. Read the comment docs.

Copy link
Collaborator

@Lynesth Lynesth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that works.
What if I add a new selectable item to the menu after I've opened it ?

I think it'd be better to check if we've looped once in the moveSelectionVertically and stop there. That way we don't have to verify items that populate the menu each time they get modified and it should be fast enough to not notice it.

@AydinHassan
Copy link
Member Author

Okay. Will close this then.

@AydinHassan AydinHassan deleted the menu-no-selectable-items branch February 15, 2020 19:37
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.

3 participants