Skip to content

Commit

Permalink
dont allow the user to bring up the command desc if there is none (#753)
Browse files Browse the repository at this point in the history
* dont allow the user to bring up the command desc if there is none

* obey our god lints

---------

Co-authored-by: nyx <[email protected]>
  • Loading branch information
nyx and nnyyxxxx authored Oct 31, 2024
1 parent 52565e5 commit 72dfb29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tui/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 72dfb29

Please sign in to comment.