mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-05 07:08:39 +00:00
macOS: show/search description when subtitle missing in CommandPalette (#13610)
<img width="1125" height="552" alt="image" src="https://github.com/user-attachments/assets/09866c9b-d5c4-422f-860b-de4de4cca055" />
This commit is contained in:
@@ -79,6 +79,7 @@ struct CommandPaletteView: View {
|
||||
let filtered = options.filter {
|
||||
$0.title.matchedIndices(for: query) != nil ||
|
||||
($0.subtitle?.matchedIndices(for: query) != nil) ||
|
||||
($0.description?.matchedIndices(for: query) != nil) ||
|
||||
colorMatchScore(for: $0.leadingColor, query: query) > 0
|
||||
}
|
||||
|
||||
@@ -401,7 +402,7 @@ private struct CommandRow: View {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
highlightedTitle
|
||||
|
||||
if let subtitle = option.subtitle {
|
||||
if let subtitle = option.subtitle ?? option.description {
|
||||
highlightedSubtitle(subtitle)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Reference in New Issue
Block a user