Open gyscos opened 8 years ago
Now at least it doesn't crash anymore - so resizing the terminal window by mistake won't kill your application.
Ideally, we'd still have a more gracious fallback: I guess cropping the view may be the best solution.
Actually, since this doesn't need a running Cursive
instance, there should probably be unit tests for that.
Testing the draw
methods may require a Dummy printer (or a printer in dummy mode).
Testing the
draw
methods may require a Dummy printer (or a printer in dummy mode).
Well, now that backends are dynamics, we could either use backends::Dummy
or some puppet backend.
Some views need some minimal space to display properly. It's usually just a few cells, but as views include other views, it adds up. And while it's rarely an issue in regular use, when resizing a view, it can happen, if only temporarily.
Currently, it often results in a panic from usize overflows.
Rather than crashing, displaying an empty view would be a minimal thing to do. Showing an error message (like "Screen size too small" or something) would be even better.