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 XMonad.Prompt wraparound when maxComplRows not Nothing #217 #291

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Jan 24, 2019

Description

When tabbing through the prompt list of completions, if the list of completions does not fit due to maxComplRows, without this fix an exception would be thrown. I am not certain why, but this exception occurs due to a pattern mismatch at https://github.com/mgsloan/xmonad-contrib/blob/dda242a4597c1ed0fa895a10b9296dcc709f4937/XMonad/Prompt.hs#L919

However, the root cause appears to be in the nextComplIndex function. The problem is that it was assuming that dividing the total item count by the number of rows would yield the number of columns. This did not hold when the number of rows was being limited.

Checklist

@mgsloan mgsloan force-pushed the fix-prompt-max-rows-wrap-around-217 branch from 1569395 to d9f43c7 Compare February 10, 2019 12:47
@mgsloan
Copy link
Contributor Author

mgsloan commented Feb 10, 2019

Ping! Any maintainer want to review this? I've rebased it atop master.

@byorgey byorgey merged commit cd404eb into xmonad:master Feb 12, 2019
@byorgey
Copy link
Member

byorgey commented Feb 12, 2019

Thanks for the PR and for the nudge!

@mgsloan
Copy link
Contributor Author

mgsloan commented Feb 13, 2019 via email

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