Skip to content

Commit 72dfb29

Browse files
nyxnyx
andauthored
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 <nnyyxxxx@users.noreply.github.com>
1 parent 52565e5 commit 72dfb29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tui/src/state.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,10 @@ impl AppState {
704704

705705
fn enable_description(&mut self) {
706706
if let Some(command_description) = self.get_selected_description() {
707-
let description = FloatingText::new(command_description, "Command Description");
708-
self.spawn_float(description, 80, 80);
707+
if !command_description.is_empty() {
708+
let description = FloatingText::new(command_description, "Command Description");
709+
self.spawn_float(description, 80, 80);
710+
}
709711
}
710712
}
711713

0 commit comments

Comments
 (0)