fix(editor): wire key events to cursor movement

- Replace gtx.Event(nil) with key.Filter{Focus: focusedID} and
  key.FocusFilter{Target: focusedID} so Gio correctly routes key
  and edit events to the focused editor text field.

- Convert EditorState.CursorPosition (byte offset) to line/column
  coordinates for accurate cursor rendering.

- Add debug logging in HandleKeyDown and HandleCursorMove.
This commit is contained in:
gmp
2026-06-03 07:41:18 -04:00
parent a17c3760f2
commit 0dac354f2a
13 changed files with 467 additions and 77 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ func TestEditorInitialLayout(t *testing.T) {
lastFrame := e2e.GetLastFrame(h)
ea := e2e.NewElementAssertions(t, lastFrame)
ea.HasElementCount(3)
ea.HasElementCount(4)
ea.HasElementOfType(reflect.TypeOf(ui.Container{}))
ea.HasElementOfType(reflect.TypeOf(ui.TextField{}))
ea.HasElementWithID("editor_text")