1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-29 16:42:13 +03:00

command palette: tweak for empty doc case

refs: https://github.com/wez/wezterm/issues/1485
This commit is contained in:
Wez Furlong 2022-12-23 14:55:16 -07:00
parent 3a9513e194
commit b12506ea30
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -242,7 +242,9 @@ impl CommandPalette {
};
// DRY if the brief and doc are the same
let label = if command.brief.to_ascii_lowercase() == command.doc.to_ascii_lowercase() {
let label = if command.doc.is_empty()
|| command.brief.to_ascii_lowercase() == command.doc.to_ascii_lowercase()
{
format!("{group}: {}", command.brief)
} else {
format!("{group}: {}. {}", command.brief, command.doc)