rust-term-grid icon indicating copy to clipboard operation
rust-term-grid copied to clipboard

Bug in smallest_diminesions_yet calculation?

Open fdncred opened this issue 5 years ago • 1 comments

I believe this for loop code https://github.com/ogham/rust-term-grid/blob/99396dd62e2a683ce4ddb1f6ce46612c4eabc3d7/src/lib.rs#L383

should be inclusive

for num_lines in (1..=theoretical_max_num_lines).rev() {

I ran into this problem where the output should've been 2 rows but it would never output 2 rows. It would always fail and return the initialized value of None for smallest_dimensions_yet.

Please confirm.

Thanks!

fdncred avatar Sep 25 '20 14:09 fdncred

Hi! We're also hitting this issue with the uutils ls, preventing us from upgrading to 0.2.0 and using the alignment feature. I just wanted to mention that the proposed fix passes the uutils tests and it'd be great to see this implemented.

tertsdiepraam avatar Apr 30 '21 11:04 tertsdiepraam