Pad/internal/ui
Greg Pomerantz 51344b9a5b IME: fix post-commit caret for replacement commits; trace IME pushes
ApplyIMECommitToModel computed the caret pushed to the IME right
after a commit as Range.End + len(text). That is correct for a plain
insertion (Start == End) but wrong for a replacement — the case a
swipe/autocorrect over a selection produces: the inserted text starts
at Range.Start, so the caret is Range.Start + len(text). A 4-rune
replacement (the 'samet' autocorrect on the phone) pushed the caret
4 runes past the inserted text, desynchronizing the IME's caret from
ours at exactly the moment its local model was being updated; the
persistent 4-rune drift that followed (every commit 4 runes ahead,
then the empty-fix-up loop) matches this.

The logic side (applyIMECommitBytes) already computed the correct
caret; this aligns the renderer's immediate push with it.

Also log every IME push (snippet restarts, selection updates, commit
pushes) from the renderer: the phone incident's logcat rotated before
it could be re-analyzed, so the next occurrence must be
reconstructable from what we actually pushed to the IME.
2026-09-13 18:58:27 -04:00
..
icons Add in-file search (find bar) 2026-08-20 00:02:54 -04:00
caret_point_test.go Handle drags: 1:1 finger tracking with cross-flip; fix caret/taps on empty lines 2026-08-19 22:34:12 -04:00
element.go IME: force a re-syncing snippet re-push when the IME desynchronizes 2026-09-13 18:23:06 -04:00
layout.go Make the editor top and bottom bars ~30% taller for bigger tap targets 2026-09-03 12:34:18 -04:00
pinch_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
pinch_tracker.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
real_draw_probe_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
render.go IME: fix post-commit caret for replacement commits; trace IME pushes 2026-09-13 18:58:27 -04:00
reveal_focus_drain_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
tag_identity_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
unit.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00