IOGCFEJZXNXE2YP5F6Q2WXQ2EPBOA64JTQTSIZSCIF67WLF2QA6AC // Handle via string representationswitch msg.String() {case "backspace":if len(m.commentText) > 0 {m.commentText = m.commentText[:len(m.commentText)-1]
// Navigation and editing keys (check by code, not string)switch key.Code {case tea.KeyLeft:if m.commentCursor > 0 {m.commentCursor--}return m, nilcase tea.KeyRight:if m.commentCursor < len(m.commentText) {m.commentCursor++}return m, nilcase tea.KeySpace:if len(m.commentText) < 140 {m.commentText = m.commentText[:m.commentCursor] + " " + m.commentText[m.commentCursor:]m.commentCursor++}return m, nilcase tea.KeyBackspace:if m.commentCursor > 0 {m.commentText = m.commentText[:m.commentCursor-1] + m.commentText[m.commentCursor:]m.commentCursor--}return m, nilcase tea.KeyDelete:if m.commentCursor < len(m.commentText) {m.commentText = m.commentText[:m.commentCursor] + m.commentText[m.commentCursor+1:]
**Changes:**- `tui/classify.go` — Added cursor position tracking and navigation**New features:**| Key | Action ||-----|--------|| `←` / `→` | Move cursor left/right || `Space` | Insert space at cursor || `Backspace` | Delete character before cursor || `Delete` | Delete character at cursor || `Ctrl+A` | Move cursor to start || `Ctrl+E` | Move cursor to end |**Fixed:**- Space bar now works in comment dialog- Backspace deletes at cursor position, not just at end