add support for windowing in select#73
Conversation
|
@cylewitruk It's better to move with the ultimate solution with automatic terminal size identification. |
|
@fadeevab alright, will have a look at that then too. I still want the windowing function so I can control the display size of the list if I want to, but using terminal size as a default will be a huge improvement 👍 I think the I'll probably expose some convenience function to get terminal size to the consumer as well, in-case they want to do their own window size caculation (could be embedded in a TUI or something). |
|
@fadeevab pushed |
@cylewitruk. Busy days. I hope I will review it soon. |
@fadeevab no rush 😊 |
| window_size: usize, | ||
| window_pos: usize, | ||
| term_size: Option<Size>, |
There was a problem hiding this comment.
Thanks for the patch! :) I believe this part should be used in the multiselect as well, thus I would ask to move it into a separate structure, e.g. "TermSize", something like I did with filter.rs for filtering in the both selection lists.
TermSize::default()
TermSize::get_size() -> usize
TermSize::set_size(usize)There was a problem hiding this comment.
@fadeevab agreed, been a bit tight with time the last weeks but I'll get to this eventually 😄
There was a problem hiding this comment.
@cylewitruk hello, no rush :) meanwhile, we managed to release few improvements to the multiprogress bar (insert and println)
|
Closed in favor of PR #83 |
Offers a solution for #64 by allowing the user to specify a max window size -- works with filtering as well. See the
select_window_sizeexample.An ultimate solution would probably use something like termsize and calculate based on the actual size of the viewport.