Fix main CI regressions (#1458)

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
This commit is contained in:
Lawrence Chen 2026-03-15 02:04:33 -07:00 committed by GitHub
parent 8db9ebb4a9
commit 9bb2816e05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 103 additions and 38 deletions

View file

@ -4441,9 +4441,13 @@ class GhosttyNSView: NSView, NSUserInterfaceValidations {
private func invalidateTextInputCoordinates(selectionChanged: Bool = false) {
guard let inputContext else { return }
inputContext.invalidateCharacterCoordinates()
if #available(macOS 15.4, *), selectionChanged {
inputContext.textInputClientDidUpdateSelection()
}
guard selectionChanged else { return }
// `textInputClientDidUpdateSelection` is absent from the Xcode 16.2 AppKit SDK
// used by the macOS 14 compatibility lane, so call it dynamically when present.
let updateSelectionSelector = NSSelectorFromString("textInputClientDidUpdateSelection")
guard inputContext.responds(to: updateSelectionSelector) else { return }
_ = inputContext.perform(updateSelectionSelector)
}
override var acceptsFirstResponder: Bool { true }