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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user