fix: only take list focus for a non-nil history selection

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:54:44 +02:00
co-authored by Claude Sonnet 5.5
parent d34d3e92da
commit 5542f9cf70
+1 -1
View File
@@ -50,7 +50,7 @@ struct HistoryView: View {
.focusable()
.focused($listFocused)
.focusEffectDisabled()
.onChange(of: list.selection) { _, _ in listFocused = true }
.onChange(of: list.selection) { _, new in if new != nil { listFocused = true } }
.onDeleteCommand {
if let id = list.selection { list.delete(id: id) }
}