mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-03 21:00:27 +00:00
`needleSelection` was introduced in #12712 to select all texts when syncing pasteboard, the crash happens most on macOS 15 in `readPasteboardNeedle`. It seems that `objectWillChange` fires differently there, and it's hard to reproduce on macOS 26/27. I think guaranteeing from ourside is enough, I believe SwiftUI already as its own when updating the binding. **Confirmed with a simple example on macOS 15, it seems a SwiftUI issue. So I changed the minimal macOS version for text selection to macOS 26. I don't see an elegant way to fix it.** <img width="1352" height="849" alt="image" src="https://github.com/user-attachments/assets/1dfef3f5-ceaa-41dd-bb91-c23dbc5e4ad3" /> ```swift struct ContentView: View { @State private var text = "" @State private var selection: TextSelection? var body: some View { TextField("Search", text: $text, selection: $selection) } } ```