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:
@@ -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) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user