Closed rezural closed 3 years ago
Thanks for the issue and PR. I just wanted to ask whether #22 is complete and ready for merging
There is nothing to test the behaviour of dynamic_paging at the moment?
(I cannot find any relevant tests).
Other than that it works as expected.
Should be ready!
OK, there is a different fix up there. I had something similar initially, & this handles if the initial string is longer than the height of the terminal.
But you output say 10 lines at a time, the last 10 will not be displayed until a key is pressed.
You will note that there is a gap of 10 lines above, even though the code (in the above branch example) outputs more than that available text to the library.
This is your second bug which I haven't worked on. Does your patch fixes it?
yep, it fixes both.
Well I am gonna merge yours instead of mine
OK,
I'll try to add something to test dynamic_paging, to make sure this fix is tested, and stays.
any advice on adding test code to test this async func?
Thanks!
Well I don't have anything personal and since it's hard to write tests for a library that provides interface to a user rather than providing nice functions to other projects, I have never really looked into it. Really thankful to you for working on it
OK,
testing the async code will be kinda hard, and require changing at least async_std_updating, run, and init::dynamic_paging functions to accept the out parameter.
Would be cool to have tests for this, but you would know better if it's actually possible.
Thanks
I have a branch which demonstrates this bug:
https://github.com/rezural/minus/tree/large-page-bug
you will see that the initial output is blank. also, uncomment https://github.com/rezural/minus/blob/large-page-bug/examples/large_page_bug.rs#L17
there is a similar bug that doesnt output the last chunk of string that goes over the height.
I'm debugging now, but you may have a quick fix.
Thanks for the library!