You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we resize the terminal, the view height doesn't change.
When i change to a greather height, the size stays the same and requestty works fine.
But when i change to a small height, enough to hide a part of the requestty view, it panics and show this error :
thread 'main' panicked at 'attempt to subtract with overflow', C:\Users\noval\rust\requestty\requestty-ui\src\input.rs:150:28
stack backtrace:
0: rust_begin_unwind
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src/panicking.rs:142:14
2: core::panicking::panic
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src/panicking.rs:48:5
3: requestty_ui::input::Input<P,B>::adjust_scrollback
at C:\Users\noval\rust\requestty\requestty-ui\src\input.rs:150:28
4: requestty_ui::input::Input<P,B>::render
at C:\Users\noval\rust\requestty\src\question\mod.rs:567:45
9: requestty::prompt_one_with
at C:\Users\noval\rust\requestty\src\lib.rs:283:15
10: requestty::prompt_one
at C:\Users\noval\rust\requestty\src\lib.rs:259:5
11: requestty_test::main
at .\src\main.rs:9:23
12: core::ops::function::FnOnce::call_once
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\ops/function.rs:248:5
The error occurs with OrderSelect (not yet implemented, see [#16]) and MultiSelect.
It doesn't seems to occur with one-line questions, like confirm or float.
Tested with PowerShell in VSCode.
The text was updated successfully, but these errors were encountered:
NovaliX-Dev
changed the title
Requestty view downs't addapt when terminal size is changed + Panics if smaller than current view height
[Bug] Requestty view downs't addapt when terminal size is changed + Panics if smaller than current view height
Aug 16, 2022
NovaliX-Dev
changed the title
[Bug] Requestty view downs't addapt when terminal size is changed + Panics if smaller than current view height
[Bug] Requestty view doens't addapt when terminal size is changed + Panics if smaller than current view height
Aug 22, 2022
Hmm, this is pretty deep rooted issue as the widgets don't actually consider the height remaining and assume there is enough space which is obviously incorrect. Thanks for bringing this issue to light!
When we resize the terminal, the view height doesn't change.
When i change to a greather height, the size stays the same and requestty works fine.
But when i change to a small height, enough to hide a part of the requestty view, it panics and show this error :
The error occurs with OrderSelect (not yet implemented, see [#16]) and MultiSelect.
It doesn't seems to occur with one-line questions, like
confirm
orfloat
.Tested with PowerShell in VSCode.
The text was updated successfully, but these errors were encountered: