Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Percentage width support #95
This is related to #94.
Finally, if either pane width is less than Vims
All this adds a little bit of bulk but it is worth the safety-nets that prevent a pane from going out of bounds or barely visible. I've tried to apply any convention I could use, tried to put the function in a decent place and used
I've tested it in Vim, NeoVim and Mvim and they all behave as expected (see #94 for version info).
@metakirby5, I made the requested changes, the
:echo ceil(66.66) " => 67.0 :echo float2nr(ceil(66.66)) " => 67
Doing just a
:echo float2nr(66.66) " => 66
Ready for additional feedback :)
These kinds of things with
When I tested the precision loss on a 127 column wide terminal the difference seemed negligible. You seem to have found a more interesting case though, nice!
I restored precision according to your specs. I inverted the ternary since most people will provide a sane hardcoded positive float.
Think it's ready for merging?