macOS: fix search bar Enter key blocking IME composition
Use onSubmit for the plain Enter → next-match behavior, which respects IME composition state. Keep onKeyPress only for Shift+Enter (previous match), returning .ignored for plain Enter so the IME can process it.pull/12781/head
parent
a968e120dd
commit
7a346dd8d4
|
|
@ -417,6 +417,10 @@ extension Ghostty {
|
|||
// to our synced needle.
|
||||
searchState.readPasteboardNeedle()
|
||||
}
|
||||
.onSubmit {
|
||||
_ = surfaceView.navigateSearchToNext()
|
||||
}
|
||||
}
|
||||
#if canImport(AppKit)
|
||||
.onExitCommand {
|
||||
if searchState.needle.isEmpty {
|
||||
|
|
@ -429,10 +433,9 @@ extension Ghostty {
|
|||
.backport.onKeyPress(.return) { modifiers in
|
||||
if modifiers.contains(.shift) {
|
||||
_ = surfaceView.navigateSearchToPrevious()
|
||||
} else {
|
||||
_ = surfaceView.navigateSearchToNext()
|
||||
return .handled
|
||||
}
|
||||
return .handled
|
||||
return .ignored
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue