โ– humdrum codex / glint v1.0.2
license AGPL-3.0

โ† issues

TASK-002 Editor inserts double space per spacebar press

๐Ÿ Done bug priority: high

created 2026-06-28 18:21 ยท updated 2026-06-28 18:22

Description

HandleKey case 'tea.KeyRunes, tea.KeySpace' loops over k.Runes inserting each rune, THEN an 'if k.Type == tea.KeySpace { InsertRune(" ") }' inserts another. In real bubbletea (v1.3.6 key.go) a space keypress is Key{Type:KeySpace, Runes:[' ']}, so both fire โ†’ two spaces. v1 test TestHandleKeySpaceInsertsSingleSpace missed it by sending KeySpace with empty Runes (unrealistic). Fix: drop the redundant if-block; make the test send Runes:[' '].

Acceptance Criteria