macos: key input that clears preedit without text shouldn't encode (#7226)
Some checks are pending
Test / test (push) Waiting to run
Nix / Required Checks: Nix (push) Blocked by required conditions
Nix / check-zig-cache-hash (push) Waiting to run
Test / Required Checks: Test (push) Blocked by required conditions
Test / build-bench (push) Blocked by required conditions
Test / build-flatpak (push) Blocked by required conditions
Test / build-linux (namespace-profile-ghostty-md) (push) Blocked by required conditions
Test / build-linux (namespace-profile-ghostty-md-arm64) (push) Blocked by required conditions
Test / build-linux-libghostty (push) Blocked by required conditions
Test / build-nix (namespace-profile-ghostty-md) (push) Blocked by required conditions
Test / build-nix (namespace-profile-ghostty-md-arm64) (push) Blocked by required conditions
Test / build-dist (push) Blocked by required conditions
Test / build-macos (push) Blocked by required conditions
Test / build-macos-matrix (push) Blocked by required conditions
Test / build-snap (namespace-profile-ghostty-snap) (push) Blocked by required conditions
Test / build-snap (namespace-profile-ghostty-snap-arm64) (push) Blocked by required conditions
Test / build-windows (push) Blocked by required conditions
Test / build-windows-cross (namespace-profile-ghostty-md, x86-windows-gnu) (push) Blocked by required conditions
Test / build-windows-cross (namespace-profile-ghostty-md, x86_64-windows-gnu) (push) Blocked by required conditions
Test / GTK x11=false wayland=false (push) Blocked by required conditions
Test / GTK x11=true wayland=false (push) Blocked by required conditions
Test / GTK x11=false wayland=true (push) Blocked by required conditions
Test / GTK x11=true wayland=true (push) Blocked by required conditions
Test / Build -Dsentry=false (push) Blocked by required conditions
Test / Build -Dsentry=true (push) Blocked by required conditions
Test / test-macos (push) Blocked by required conditions
Test / zig-fmt (push) Waiting to run
Test / prettier (push) Waiting to run
Test / alejandra (push) Waiting to run
Test / typos (push) Waiting to run
Test / translations (push) Waiting to run
Test / blueprint-compiler (push) Waiting to run
Test / Test pkg/wuffs (push) Blocked by required conditions
Test / Test build on Debian 12 (push) Blocked by required conditions
Test / flatpak-check-zig-cache (push) Waiting to run
Test / Flatpak (map[arch:aarch64 runner:namespace-profile-ghostty-md-arm64]) (push) Blocked by required conditions
Test / Flatpak (map[arch:x86_64 runner:namespace-profile-ghostty-md]) (push) Blocked by required conditions

Fixes #7225
This commit is contained in:
Mitchell Hashimoto 2025-04-28 14:58:19 -07:00 committed by GitHub
commit 9a4419ce85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -975,7 +975,14 @@ extension Ghostty {
event: event,
translationEvent: translationEvent,
text: translationEvent.ghosttyCharacters,
composing: markedText.length > 0
// We're composing if we have preedit (the obvious case). But we're also
// composing if we don't have preedit and we had marked text before,
// because this input probably just reset the preedit state. It shouldn't
// be encoded. Example: Japanese begin composing, the press backspace.
// This should only cancel the composing state but not actually delete
// the prior input characters (prior to the composing).
composing: markedText.length > 0 || markedTextBefore
)
}
}