fix(scrollbar): show in small viewport #515
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
asciiDrawingSizeon slider drag.If the viewport dimention is only 1 character in either dimension then the viewport's content is preferred:

In future it might be desired to draw the slider element (or a diamond/lozenge?) instead of one arrow in a 1 character bar, but for now this is better than randomly disappearing when the viewport size becomes smaller than 4 characters.
There is some unnecessary looping going on during resize operations, but scrollbars that are too small isn't a directly related to that (there was a divide by zero crash before).
In future it should also be considered how to avoid setting range parameters and so on whilst a resize operation is currently in progress, as ideally those values only need setting if, the scrollbar is visible; it is needed, and; not until after mouse release.
This PR doesn't fix the problem with a scrollbar not hiding itself when the only reason for it being visible is due to the visibility of the scrollbar for the other dimension (that shall require yet other recursive calculation to make an accurate decision).