Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS can request
firstRectForCharacterRange:immediately aftersetMarkedText:, before another paint. BothPromptInputandLoginInputconvert the range against current text but look it up in the previous frame's layout. Growing a composition past that layout returnsNone; GPUI then returns a zero rectangle, allowing the IME candidate window to fall back away from the insertion point.Compute IME bounds from the current display text using the font, line height and wrapping width captured during paint. A small shared helper in
jcode-desktop-ui-corehandles both inputs; login geometry only shapes masking bullets. Range rectangles stay on the first visual line. This does not change composition selection or commit behavior.Related to #6 as a separate IME follow-up: that issue fixed composition-relative UTF-16 selection and a crash. This change addresses geometry between edits and paint. It does not change GPUI, runtime dependencies, or UI scaling.
Validation on macOS ARM64:
cargo test --workspace --no-fail-fast: 1,821 passed, 2 failed, 13 ignored. Both failures also reproduce on unmodified39b645f:terminal_eof_waits_for_descendants_and_buffered_tailandnative_mermaid_tall_diagram_fits_shared_viewport_without_clipping.Tested against Desktop
39b645f, pinned GPUIbe875c5, and sibling Jcode48aa83e. Native candidate-window verification with EchoType is still pending; the automated reproduction covers the synchronous handler sequence, not a live IME session.