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 making one too many "vscreens" in extend case #65

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

smemsh
Copy link
Contributor

@smemsh smemsh commented Jul 14, 2024

The extend code keeps counting by N but N is a count, not an index. Index numbers should be considered as shifted by one from count numbers. Result is growing (requested "vscreens" value larger than currently configured one) will end up making one too many. Shrinking already works correctly.

growing the number (set vscreens N) at runtime would always grow one
extra: new set of vscreens had the last one indexed at N, rather than
N-1.  this meant there was always one extra when we grew the vscreen
count.  the end must be shifted by one left.

conversely, shrinking already worked correctly: the new set of vscreens
would have the last one indexed at N-1
@jcs jcs merged commit b777d1d into jcs:master Jul 14, 2024
1 of 2 checks passed
@smemsh smemsh deleted the vscreens-grow-offbyone branch September 10, 2024 00:06
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