From 5d68f49e59728b2c04cb6a47fc99708f406a23d1 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Tue, 30 Jul 2024 23:20:56 +0100 Subject: [PATCH] Fix always selecting the first item to run --- src/list.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/list.rs b/src/list.rs index 753b9e02..567d2d70 100644 --- a/src/list.rs +++ b/src/list.rs @@ -414,11 +414,6 @@ impl CustomList { /// /// Returns `Some(command)` when command is selected, othervise we returns `None` fn handle_enter(&mut self) -> Option { - // Ensure an item is selected if none is selected - if self.list_state.selected().is_none() { - self.list_state.select(Some(0)); - } - // Get the selected index let selected = self.list_state.selected().unwrap();