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
Describe the bug
When creating a menubar with an empty subtree, panics when you select it in the menu.
Dealing with this as I want to create a dynamic menubar to select a file, although maybe this isn't the best approach.
To Reproduce
letmut siv = cursive::default();
siv.menubar().add_subtree("foo",Tree::new());
siv.add_global_callback(Key::Esc, |s| s.select_menubar());
siv.run();// Then press escape, go to foo and press enter.
Expected behavior
Expected to not panic
Environment
OS: Linux (Nobara 39)
Backend used: ncurses
Current locale: en_US
Cursive version: 0.20.0
Nightly rust in debug build
Additional context
Assuming index OOB error "len is 0 but index is 0":
Describe the bug
When creating a menubar with an empty subtree, panics when you select it in the menu.
Dealing with this as I want to create a dynamic menubar to select a file, although maybe this isn't the best approach.
To Reproduce
Expected behavior
Expected to not panic
Environment
Additional context
Assuming index OOB error "len is 0 but index is 0":
cursive/cursive-core/src/views/menu_popup.rs
Line 331 in 0a95c82
As panic points to around there (line 335 specifically).
The text was updated successfully, but these errors were encountered: