Skip to content

Deal with panic, improve alloc in color_cycle, swap 3D rectpack for packr2 using Skyline #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

isinyaaa
Copy link

@isinyaaa isinyaaa commented Mar 18, 2025

Hi, cool project, just spent some time studying your implementation, here are some minor enhancements.
I'll leave another comment inline that I can also fix if you want.

Ah, another thing: in main you are unwrapping an error an that's what makes panics behave badly (terminal state is not reset), so you might also want to collect the error before resetting ratatui.

@@ -86,54 +91,41 @@ impl StatefulWidgets {
// }

pub fn selected_category_widget(&self, keymap_context: &KeyMapContext) -> &ShortcutsWidget {
let idx = keymap_context.category_idx().expect("no category selected");
let idx = keymap_context.category_idx().unwrap_or(0); //.expect("no category selected");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, maybe you just don't want to have an option for the current_category field, and keep the last selection after (DeselectCategory)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant