Only render as many lines as the terminal can actually display#563
Only render as many lines as the terminal can actually display#563chris-laplante merged 5 commits intoconsole-rs:mainfrom
Conversation
|
@oli-obk thank you for working on this, I appreciate it greatly! I will review today or tomorrow :) |
|
@oli-obk I'm curious about your use case for indicatif? |
|
I am rewriting compiletest-rs (https://github.com/oli-obk/ui_test). Similar to regular Rust ui tests, it currently has a |
|
Note that this PR appears to not fully fix the issue (I got the progress bar moved upwards and then everything fixed itself for about 15 times while running >200 tests). I have tried to debug that with the dummy terminal I added, but I think that nothing is actually wrong, and this may just be an issue because I'm running everything across ssh and there are some delays sometimes |
chris-laplante
left a comment
There was a problem hiding this comment.
Looks really good! I can tell you've put a ton of work into this :), and we (@djc and I) really appreciate it. I think just a couple small things to clean up.
I tested the multi-many example on my own laptop and it worked fine, even as I was resizing the terminal.
c773d02 to
571572a
Compare
|
I made the tests simpler (they are just strings now that you can mostly copy out of the assertion failure message). All other reviews should also have been addressed |
571572a to
256948f
Compare
256948f to
2a5b033
Compare
|
Does this handle shrinking the vertical size of the terminal? When doing so the terminal is temporarily 1 line smaller than indicatif expected when rendering until the next time the size is queried and everything is rendered again. Leaving a line as buffer may help with this. |
There was a problem hiding this comment.
Thanks!
Minor nit if you want to clean it up: some of the commit messages are now slightly wrong respective to the commit contents: "Add a test terminal" is more like "Add history to the in-memory terminal" and "Edit an existing test" is more like "Edit an existing example".
I tried it out and resizing is indeed an issue. I don't think leaving an extra line as buffer is going to significantly help us here, and I'd rather look into this in general |
2a5b033 to
8347ecb
Compare
done |
|
@chris-laplante do you want to take another look? Would be good to release this along with the other recent fixes. |
Yes, I'll take a quick look this morning. |
|
Sorry for the delay. Looks great, thanks again! |
fixes #496