A simple, high performance text editor.
Go to file
Greg Pomerantz a83cc1a72f IME: guard distant commits; arm the resync on the first anomaly
The boundary trace (PADIME at EditorStateChanged) showed why a
desynchronized IME never heals itself: gioui's EditorReplace advances
its stored selection state when the commit arrives, so the
post-commit selection push is always deduplicated away and
updateSelection is never sent after a commit. A desynced IME is
therefore healed only by a snippet restart — and the resync was
armed only after THREE consecutive anomalies, while the phone
incident's first anomaly (a 5-rune autocorrect 19,000 runes from
the caret, width > 2) sailed through the old <=2-rune guard and
clobbered distant text before any resync could fire.

Now:
- the guard also snaps commits that are far from the caret AND
  outside the live selection (a legitimate commit is always local:
  at the caret, inside the selection, or a nearby correction);
  a distant commit lands at the caret instead of clobbering text;
- the resync is armed on the FIRST anomalous commit (snapped or
  distant), not after a streak; the streak counter is gone;
- imeSelectionRuneRange() lets the guard allow selection
  replacements anywhere.

TestRealFile_IMEForceResync rewritten for the new semantics and
extended with the distant-replacement case (must land at the
caret and arm the resync).
2026-09-13 22:31:28 -04:00
.qwen Add ShapeText/DrawShapedText: single shaper call, zero-call drawing 2026-05-12 12:06:28 -04:00
cmd/pad IME: fix random mid-word capitalization (stable snippet window + commit in-flight handling) 2026-09-13 17:00:49 -04:00
doc Restore the browser page on relaunch, not the last edited file 2026-09-03 12:11:44 -04:00
internal IME: guard distant commits; arm the resync on the first anomaly 2026-09-13 22:31:28 -04:00
scripts IME: map commits against the whole buffer; drop the renderer-side model 2026-09-13 11:57:38 -04:00
tools/touchinject Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
.DS_Store Add drawPng function to Renderer for PNG icon rendering 2026-05-10 06:26:29 -04:00
.gitignore Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
go.mod IME: guard distant commits; arm the resync on the first anomaly 2026-09-13 22:31:28 -04:00
go.sum IME: guard distant commits; arm the resync on the first anomaly 2026-09-13 22:31:28 -04:00