Comments (1)
I have the same problem, but mine shows up when I use q or esc with interact_opt, only when I restrict the amount of items to <40 then it works on windows, but on linux it works perfectly with a lot more items.
thread 'main' panicked at 'attempt to subtract with overflow', C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\cons
ole-0.13.0\src\windows_term.rs:153:32
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\std\src\panicking.rs:483
1: core::panicking::panic_fmt
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\core\src\panicking.rs:85
2: core::panicking::panic
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\core\src\panicking.rs:50
3: console::windows_term::move_cursor_up
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\console-0.13.0\src\windows_term.rs:153
4: console::term::Term::move_cursor_up
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\console-0.13.0\src\term.rs:357
5: console::term::Term::clear_last_lines
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\console-0.13.0\src\term.rs:391
6: dialoguer::prompts::select::Select::_interact_on
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\dialoguer-0.7.1\src\prompts\select.rs:308
7: dialoguer::prompts::select::Select::interact_on_opt
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\dialoguer-0.7.1\src\prompts\select.rs:242
8: go_version_manager::ask_for_version
at .\src\main.rs:65
9: go_version_manager::main::{{closure}}::{{closure}}
at .\src\main.rs:1
10: core::future::from_generator::{{impl}}::poll<generator-0>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\future\mod.r
s:80
11: tokio::runtime::enter::{{impl}}::block_on::{{closure}}<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\enter.rs:160
12: tokio::coop::with_budget::{{closure}}<core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Erro
r>>,closure-0>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\coop.rs:127
13: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::try_with<core::cell::Cell<tokio::coop::Budget>,closur
e-0,core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Error>>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\local.
rs:272
14: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::with<core::cell::Cell<tokio::coop::Budget>,closure-0,
re-0,core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Error>>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\local
.rs:272
14: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::with<core::cell::Cell<tokio::coop::Budget>,closure-0
,core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Error>>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\local
.rs:248
15: tokio::coop::with_budget
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\coop.rs:120
16: tokio::coop::budget
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\coop.rs:96
17: tokio::runtime::enter::Enter::block_on<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\enter.rs:160
18: tokio::runtime::thread_pool::ThreadPool::block_on<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\thread_pool\mod.rs:82
19: tokio::runtime::{{impl}}::block_on::{{closure}}<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\mod.rs:446
20: tokio::runtime::context::enter<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\context.rs:72
21: tokio::runtime::handle::Handle::enter<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\handle.rs:76
22: tokio::runtime::Runtime::block_on<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\mod.rs:441
23: go_version_manager::main::{{closure}}
at .\src\main.rs:27
24: std::panicking::try::do_call<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs
:381
25: std::panicking::try::do_catch<std::panic::AssertUnwindSafe<closure-0>,core::task::poll::Poll<core::result::Result<core::r
esult::Result<tuple<>, std::io::error::Error>, tokio::runtime::task::error::JoinError>>>
26: std::panicking::try<core::result::Result<tuple<>, go_version_manager::error::Error>,closure-0>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs
:345
27: std::panic::catch_unwind<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:382
28: quit::__run<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\quit-1.1.2\src\lib.rs:74
29: go_version_manager::main
at .\src\main.rs:1
30: core::ops::function::FnOnce::call_once<fn() -> core::result::Result<tuple<>, go_version_manager::error::Error>,tuple<>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\functio
n.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
from dialoguer.
Related Issues (20)
- History is not available for import HOT 1
- In tmux session content is pasted multiple times HOT 1
- Don't impose colon on prompt format
- Confirm dialogue doesn't work with non latin alphabet characters HOT 4
- In `Input`, cursor behavior is buggy when deleting a character when `with_prompt()` contains a newline HOT 1
- Use of moved value `confirm` HOT 5
- Select with default on second page shows first page
- Multiselect example doesn't work: selection is never re-rendered HOT 2
- Feature request: option for newline for `Input`
- Feature suggestion: prompt timeouts HOT 1
- BUG - Input with utf8 chars HOT 1
- Password prompt freezes program when a long password is entered HOT 4
- Unable to change selection of a Select in certain terminals.
- Feature: Tab to select line and move down HOT 1
- Select : prompt is no longer displayed HOT 1
- Cursor disappears after using Select HOT 1
- Select - Let users scroll faster with page-down/up
- Custom shortcuts/keybindings/hotkeys support HOT 3
- FuzzySelect returns wrong index if items has duplicate entries HOT 3
- Feature request: alert message with pressing enter as only option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dialoguer.