A simple, high performance text editor.
Go to file
Greg Pomerantz 941285e7cc Fix scroll-anchored selection (shadowing) + IME insets keyboard handling
Two user-reported bugs in the post-wrap build:

1. Selection 'jumped' when scrolling: frameOf's chunked branch shadowed the
   outer start/end with 'start, end, winLine := cb.VisibleByteRange(...)',
   leaving IMEWindowStartByte at 0 for chunked files while scrolled, so the
   window-relative selection highlight (and IME commits) mis-mapped near the
   file top. Fix: declare winLine outside, assign. Mutation-verified
   regression tests: real_file_scroll_selection_test.go.

2. Bottom bar hidden behind the keyboard: GioView extends SurfaceView, which
   unconditionally marks the window FORMAT_TRANSLUCENT; translucent windows
   are never IME-resized, so adjustResize is dead. Fix (build scripts):
   smali-patch a PadInsetsListener OnApplyWindowInsetsListener onto the
   GioView (shrinks it by the IME inset bottom) + setDecorFitsSystemWindows
   (false) on API 30+ so insets are dispatched. targetSdk kept at 34.

3. (Found while fixing 2) Keyboard could not be dismissed: TextField.Draw
   issued SoftKeyboardCmd{Show:true} every frame; with insets-driven
   resizes, the hide animation triggered redraws that re-showed the keyboard
   mid-animation. Fix: ShowIMESeq pulse from the logic layer (open/tap/
   double-tap); renderer shows only on pulse change, re-arming on focus
   loss — matching widget.Editor.

On-device (emulator): BACK dismisses and stays down; tap re-shows; typing
works; bottom bar above keyboard; word selection anchored across flick
scroll. go test -race ./... green. Phone APK rebuilt with the same patch.
2026-08-17 21:52:53 -04:00
.qwen Add ShapeText/DrawShapedText: single shaper call, zero-call drawing 2026-05-12 12:06:28 -04:00
cmd/pad Fix word-wrap scroll jump: visual-line mapping via WrapIndex 2026-08-17 19:46:47 -04:00
doc Fix scroll-anchored selection (shadowing) + IME insets keyboard handling 2026-08-17 21:52:53 -04:00
internal Fix scroll-anchored selection (shadowing) + IME insets keyboard handling 2026-08-17 21:52:53 -04:00
scripts Fix scroll-anchored selection (shadowing) + IME insets keyboard handling 2026-08-17 21:52:53 -04:00
.DS_Store Add drawPng function to Renderer for PNG icon rendering 2026-05-10 06:26:29 -04:00
.gitignore Refactor RealFileSystem to use WorkingDir, and ensure clean shutdown with FlushAll 2026-06-05 11:42:39 -04:00
go.mod Update to gioui v0.10.0. 2026-06-03 22:17:52 -04:00
go.sum Update to gioui v0.10.0. 2026-06-03 22:17:52 -04:00