mirror of
https://github.com/bobwen-dev/hunter
synced 2025-04-12 00:55:41 +02:00
fix crash when "running" first section in actions
This commit is contained in:
parent
7583e0a16e
commit
8c23d058ad
@ -160,6 +160,12 @@ impl ListView<Vec<QuickActions>> {
|
|||||||
let selection = self.get_selection();
|
let selection = self.get_selection();
|
||||||
let selected_action_index = selection - fold_start_pos;
|
let selected_action_index = selection - fold_start_pos;
|
||||||
|
|
||||||
|
// Fixes crash when "running" first description and nicer to use
|
||||||
|
if self.is_description_selected() {
|
||||||
|
self.toggle_fold()?;
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
self.content[current_fold]
|
self.content[current_fold]
|
||||||
.actions
|
.actions
|
||||||
// -1 because fold description takes one slot
|
// -1 because fold description takes one slot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user