From 72dfb2996965b66d11001cf3c2847e30c0ba8a87 Mon Sep 17 00:00:00 2001 From: nyx Date: Thu, 31 Oct 2024 14:42:06 -0400 Subject: [PATCH] dont allow the user to bring up the command desc if there is none (#753) * dont allow the user to bring up the command desc if there is none * obey our god lints --------- Co-authored-by: nyx --- tui/src/state.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tui/src/state.rs b/tui/src/state.rs index 0f0b6fe5..be120436 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -704,8 +704,10 @@ impl AppState { fn enable_description(&mut self) { if let Some(command_description) = self.get_selected_description() { - let description = FloatingText::new(command_description, "Command Description"); - self.spawn_float(description, 80, 80); + if !command_description.is_empty() { + let description = FloatingText::new(command_description, "Command Description"); + self.spawn_float(description, 80, 80); + } } }